On Mon, Apr 9, 2012 at 11:23 AM, Bhuvan Krishna <[email protected]> wrote:
> Hi all,
>
> I discovered pyjamas few day's back and found very interesting (actually
> I was searching for such a program). I have an idea of creating small
> widgets like google gadgets or gnome screenlets that stick to the
> desktop and show useful information. Below are the links for screenshots
> and more details of both the projects. These projects have been
> discontinued now as far as i know.
>
> Google Gadgets
> https://code.google.com/p/google-gadgets-for-linux/
>
> [GNOME Screenlets]
> http://screenlets.org/index.php/Screenshots
>
> My questions are.
>
> 1. Is it possible to create such widgets/gadgets for desktop using
> pyjamas on Windows/Linux (I prefer Debian)?

 yes of course.  the starting point is however firstly nothing to do
with pyjamas, but requires that you solve - using pygtk2 - the issue
of writing transparent windows onto the main desktop window.

 i've done a quick bit of research - i'm not going to do all of it for
you! - and it appears to be slightly trickier than at first seems:
http://stackoverflow.com/questions/1934442/drawing-on-the-x-root-window
http://stackoverflow.com/questions/6259924/draw-directly-to-the-root-window-with-pycairo

 apart from anything, it appears that there's a difference depending
on what Window Manager you're using.

 for w32, i used plain w32 GDI with python-ctypes to gain access to
the w32 GDI API, so you will have to work out how to specify
transparent windows, there.

 i'm quite happy for the pyjd/mshtml.py, pyjd/windows.py and
pyjd/pywebkitgtk.py code to be modified to remove the window border
and specify transparency as an option - if you work out how it's done
:)

 find and write a python-gtk2 and a python-ctypes windows.py
application that does transparency and i'll test them out and
incorporate them into the pyjd codebase, ok?

> 2. On windows how do i use (force) webkit instead of MSHTML for
> rendering the widgets?

 right.  you really don't want to do that.   take a look at the list
of dependencies and peoples' previous efforts (including mine) to
compile webkit for w32.  it was an absolute fucking bitch.  i spent a
WEEK getting it running: that included patches to webkit.  i also had
to use a version of gcc (4.0) which i had at the time to apply
*bug-fixes* to (!).  but, now it *might* be easier.

 but... really... that one week was an extremely intensive time, and
you should allow at least one entire full month of intensive research
and trial and error to replicate it.

 ... then you will also need to compile up python as well, for w32,
and that exercise was something that i spent... i think... six weeks
getting it to work.  in the end i had to give up.

the point is: yes, if you have a _lot_ of time on your hands, please
feel free to try: i will help you as best i can.


> from the documentation and running the examples of pyjamas on windows i
> am convinced that i can achieve the above goals, But i don't know yet of
> how to.

 see the INSTALL.txt - it's very simple.  install python-comtypes
(google it).  install pyjamas.  you're done.  it works.

 it's incredibly ironic for me, because this is a software (libre)
project that is supposed to be easy to install cross-platform and
cross-desktop widget set applications, and unlike all the other
desktop widget sets it's *easier* to install for w32 than it is for
free software OSes.

 gotta love that....

l.

Reply via email to