chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] setting window title using xlib


From: Andre Kuehne
Subject: [Chicken-users] setting window title using xlib
Date: Sat, 14 Apr 2007 13:29:14 +0200
User-agent: Thunderbird 1.5.0.10 (X11/20070221)

Dear all

Can someone give me an example of how to set a window title using the 
xlib-module?

Currently i have something like this:

(define (create-window display width height image-path)
  (let* ((screen (xdefaultscreen display))
         (root (xrootwindow display screen))
         (window (xcreatesimplewindow display root 0 0 width height 0
                                      (xblackpixel display screen)
                                      (xwhitepixel display screen)))
         (textprop #f))
    (assert window)
    (assert (not (= 0 (xstringlisttotextproperty (list image-path) 1 
textprop))))
    (assert textprop)
    (xsetwmname display window textprop)
    (xselectinput display window (bitwise-ior EXPOSUREMASK
                                              BUTTONPRESSMASK
                                              KEYPRESSMASK))
    (xmapwindow display window)
    window))

But acording to Xutil.h XStringListToTextProperty expects the stringlist to be 
a char**:

extern Status XStringListToTextProperty(
    char**              /* list */,
    int                 /* count */,
    XTextProperty*      /* text_prop_return */
);

How do i call xstringlisttotextproperty correctly in chicken?
Or is there some other way?

Andre Kühne




reply via email to

[Prev in Thread] Current Thread [Next in Thread]