GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Mon Aug 29, 2016 7:51 pm

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Designing a Gtk Desktop Enviroment.
PostPosted: Fri Jun 29, 2007 1:11 am 
GTK+ Guru

Joined: Thu Jun 21, 2007 1:52 pm
Posts: 198
Location: Wilkes Barre Pa
I have been looking at designing my own light weight desktop environment that consists of

1. Desktop Panel
2. Window Manager
3. Session Manager

4. Login Manager
5. File Manager
6. Desktop Icons

I have a good start on most things listed above.

1. Desktop Panel
I have all the skill required to build a functional desktop panel right now i am
just working out the design. I am using "C & Gtk+ for the base, Lua for Plugins and Scripting,
Xlib to obtain info on root window width and x, y position and child windows to root for a taskbar etc.

2. Window Manager
I found a site that shows how to build a basic window manager in 50 lines of c code using xlib And i am now looking into...

* Substructure redirection, which allows the window manager to intercept requests to change the screen layout. This enables a window manager to enforce a window layout policy.
* Reparenting, which lets the window manager build a frame or other "decoration" around each top-level window. The frame could possibly contain boxes which could be used to move or resize the window.
* The save-set, which ensures that the windows the window manager iconifies or reparents are returned to their original state if the window manager dies unexpectedly.

Only problem here is i am having a hell of a time finding some example code on reparenting.

3. The session manager
I haven't put much thought into a session manager but i am think this feature should be in
the window manager.

4. Login Manager
I have this all worked out using ("C, Gtk+, Cairo and Xlib")

5. File Manager
Here i have acquired all the skills to build something comparable to Thunar or pcmanfm except the most important part "Gtk Iconview" i know how to use treeview & i know how iconview is used in gtk ruby but with C & Gtk i am having a few issues. I cant find any tutorials or example code anywheres.

6. Desktop Icons
I have come up with a couple of ways to possibly achieve "Desktop Icon" support.

1. Use Xlib to create a "root" window and use "cairo or imlib2" to draw the background
image ie "Wallpaper" and then draw the desktop icons on top of the background and
then assign events to the icons & build a gtk popup menu for a right click mouse event.

Problem: I am thinging that the background image will
have to be redrawn every time an icon is moved and i think this would cause cpu,
memory usage spikes? And black shadows to chase the icons as i am moving them.

2. Use pixbuf to achieve the same thing above but animated.

Problem: I used the pixbuf-demo in the demo folder in the gtk+ source package but
i modified it to be full screen and use a wallpaper that i choose.
My system is a Amd Sempron 1.6 ghz 64bit cpu 512megs ram & Ati rage 128 pro ultra
16 meg video card. On my system when i tried the pixbuf-demo at full screen the memory
usage was about 6megs of ram and 5% cpu usage. So the issue i see here could all
depend. I am assumeing if you had 25 icons wizeing around your desktop the cpu &
memory usage might git somewhat heavy.

3. Use gtk iconview

Problem: I tried doing this once before with ruby gtk the only problem was i couldn't
figure out how to apply a background image or change colors to the gtk iconview widget.
besides that the memory usage was about 12 megs but i am betting that was due to the
ruby interpreter. Also as i mentioned above i am having some issues finding tutorials or
example code for gtk iconview.

So if anyone has any comments or suggestions or even any links to tutorials or example code
or if you also have a interest in desktop design with gtk feel free to chat it up.

Thanks for listening.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group