[python] How can a noob get a simple implementation?
Federico Pelloni
federico.pelloni at gmail.com
Tue Aug 30 08:37:40 PDT 2005
Hi everybody :-)
First of all, a bit of scenery:
- python window manager (today, a wrapper over Pywm)
- python taskbar (building it on my own)
They should communicate between them, and since I want this simple
DE to be modern (the taskbar uses cairo for rendering) I thought
the best way is DBus.
My idea:
1 - a window is created
2 - the WM should emit a signal (let's say "window.created") over dbus
with no particular destination (it could be useful also for a pager, one
day)
3 - the taskbar receives the signal "window.created" sent by "org.fredp.wm"
4 - it draws the new task using the infos shipping with the signal
window.created
My questions:
Either
A - is it possible to have this done with a few (I mean 2 or 3, not many
more)
function calls? Maybe a
dbus.emit_signal("window.created", (windowobject))
in the WM code and a
dbus.add_signal_receiver("window.created", self.draw_task)
in the taskbar code. Quick and simple, I don't need much more.
OR
B - is there an up-to-date clear tutorial showing how to do something
similar?
Often I find code that doesn't work (even that from the official how-to,
I can't import dbus.service)
In the end, I'm sorry if my English is poor, it isn't my mother lang.
Good bye and many thanks, Federico
More information about the dbus
mailing list