xwem-patches
[Top] [All Lists]

Summary for xwem--main--2.2--patch-40

From: Zajcev Evgeny <lg@xxxxxxxx>
Subject: Summary for xwem--main--2.2--patch-40
Date: Tue, 22 Nov 2005 02:09:26 +0300
Location: lg@xxxxxxxxxxxxxx http://arch.xwem.org/2005/

Revision: xwem--main--2.2--patch-40
Archive: lg@xxxxxxxxxxxxxx
Creator: Zajcev Evgeny <lg@xxxxxxxx>
Date: Tue Nov 22 02:09:16 MSK 2005
Standard-date: 2005-11-21 23:09:16 GMT
New-files: dockapp/.arch-ids/xwem-mpd.el.id
    dockapp/xwem-mpd.el icons/.arch-ids/mini-lyrics.xpm.id
    icons/mini-lyrics.xpm
Modified-files: utils/xwem-osd.el
New-patches: lg@xxxxxxxxxxxxxx/xwem--main--2.2--patch-40
Summary: Initial import of xwem-mpd
Keywords: osd, dockapp, musicpd

* utils/xwem-osd.el (xwem-osd-icon-pixmap-add): [new] Create Icon
  instance from already existing Pixmap.

* dockapp/xwem-mpd.el (new): Initial import of xwem interface to MusicPD,
  originally xwem-mpd is written by Richard Klinda and was adopted by
  Zajcev Evgeny to be put into xwem distribution.  Thank you Richard for
  this and keep contributing!

* icons/mini-lyrics.xpm (new): Icon dispayed when now playing song lyrics
  available locally.

* added files

    dockapp/.arch-ids/xwem-mpd.el.id
    dockapp/xwem-mpd.el
    icons/.arch-ids/mini-lyrics.xpm.id
    icons/mini-lyrics.xpm
    {arch}/xwem/xwem--main/xwem--main--2.2/lg@xxxxxxxxxxxxxx/patch-log/patch-40

* modified files

--- orig/utils/xwem-osd.el
+++ mod/utils/xwem-osd.el
@@ -621,55 +621,53 @@
     (xwem-osd-apply-xmask osd)
     osin))
 
-(defun xwem-osd-icon-data-add (osd xpm-data &optional x y depth)
-  "In OSD's window add icon.
-X and Y specifies osd instance location inside OSD(default is 0 0).
-DEPTH specifies osd instance depth(default is 0).
-XPM-DATA string of xpm image."
-  (unless depth
-    (setq depth 0))
-  (unless x
-    (setq x 0))
-  (unless y
-    (setq y 0))
+(defun xwem-osd-icon-pixmap-add (osd pixmap mask &optional x y depth)
+  "In OSD's window add pixmap icon."
+  (unless depth (setq depth 0))
+  (unless x (setq x 0))
+  (unless y (setq y 0))
 
   (let ((xdpy (xwem-osd-xdpy osd))
-       osin xpix xpix-mask)
-
-    ;; Created OSD icon instance
-    (setq osin (xwem-osd-add-instance osd depth))
+       (osin (xwem-osd-add-instance osd depth)))
     (setf (xwem-osd-instance-type osin) 'icon)
 
-    (setq xpix (X:xpm-pixmap-from-data
-                xdpy (xwem-osd-instance-xwin osin) xpm-data)
-          xpix-mask (X:xpm-pixmap-from-data
-                     xdpy (xwem-osd-instance-xwin osin) xpm-data t))
-
-    (XCopyArea xdpy xpix-mask (xwem-osd-instance-xmask osin)
+    (XCopyArea xdpy mask (xwem-osd-instance-xmask osin)
                xwem-misc-mask-bgc 0 0
-               (X-Pixmap-width xpix-mask) (X-Pixmap-height xpix-mask)
-               x y)
+               (X-Pixmap-width mask) (X-Pixmap-height mask)
+               0 0)
     (X-XShapeMask xdpy (xwem-osd-instance-xwin osin)
                   X-XShape-Bounding X-XShapeSet 0 0 (xwem-osd-instance-xmask 
osin))
-    (XCopyArea xdpy xpix-mask (xwem-osd-xmask osd)
+    (XCopyArea xdpy mask (xwem-osd-xmask osd)
                xwem-misc-mask-bgc 0 0
-               (X-Pixmap-width xpix-mask) (X-Pixmap-height xpix-mask)
+               (X-Pixmap-width mask) (X-Pixmap-height mask)
                x y)
     (xwem-osd-apply-xmask osd)
-
-    (XSetWindowBackgroundPixmap (xwem-dpy) (xwem-osd-instance-xwin osin) xpix)
-
+    (XMoveResizeWindow (xwem-dpy) (xwem-osd-instance-xwin osin) x y
+                       (X-Pixmap-width mask) (X-Pixmap-height mask))
+    (XSetWindowBackgroundPixmap (xwem-dpy) (xwem-osd-instance-xwin osin) 
pixmap)
     (xwem-osd-instance-show osin)
     osin))
 
+(defun xwem-osd-icon-data-add (osd xpm-data &optional x y depth)
+  "In OSD's window add icon.
+X and Y specifies osd instance location inside OSD(default is 0 0).
+DEPTH specifies osd instance depth(default is 0).
+XPM-DATA string of xpm image."
+  (xwem-osd-icon-pixmap-add
+   osd
+   (X:xpm-pixmap-from-data
+    (xwem-osd-xdpy osd) (xwem-osd-xwin osd) xpm-data)
+   (X:xpm-pixmap-from-data
+    (xwem-osd-xdpy osd) (xwem-osd-xwin osd) xpm-data t)
+   x y depth))
+
 (defun xwem-osd-icon-file-add (osd xpm-file &optional x y depth)
   "Same as `xwem-osd-icon-data-add', but takes xpm image from FILE."
   (let (xpm-data)
     (with-temp-buffer
       (insert-file-contents-literally xpm-file)
       (setq xpm-data (buffer-substring)))
-
-  (xwem-osd-icon-data-add osd xpm-data x y depth)))
+    (xwem-osd-icon-data-add osd xpm-data x y depth)))
 
 (defun xwem-osd-offscreen (osd)
   "Put OSD off the screen, displaying OSD copy.




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