* * *

Author Topic: Writing desktop-enviroinment in Lazarus  (Read 4657 times)

Rave

  • Full Member
  • ***
  • Posts: 151
Writing desktop-enviroinment in Lazarus
« on: November 15, 2011, 07:42:31 am »
I'd like to write desktop environment in Lazarus. For window decorator I'll use Metacity (but in the config window there will be option to switch it). But this raises several questions:

- How to manage taskbar area (buttons for active apps)?
- How to manage systray area?

My goal is to replicate Haiku's desktop environment for Linux users as it is great and very straightforward. True, there are some DMs that look similar to Haiku/BeOS, but they usually replicate only window decoration and not main feature - Tracker.

So if any of you know how to manage taskbar and/or systray area, please share your experience, preferably with code and (even better) a component for it.

This will be Linux-only, so portability other than between different distros is not a concern.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3537
Re: Writing desktop-enviroinment in Lazarus
« Reply #1 on: November 15, 2011, 07:51:54 am »
Why not finish the Free Pascal Window Manager instead of starting a new project?

http://wiki.lazarus.freepascal.org/Free_Pascal_Window_Manager

FPWM is not so initial, it is object oriented and it already works and has install instructions, but I never managed to upgrade the window decoration (I don't like the current look) and it lacks a taskbar and lacks a system tray.

I am open to the Haiku idea as long as we keep in the design flexibility to allow a normal KDE/Windows look too.

>- How to manage taskbar area (buttons for active apps)?

You have to write the taskbar. Usually it is a stand-alone program

> - How to manage systray area?

It is usually written inside the taskbar program
« Last Edit: November 15, 2011, 07:55:18 am by felipemdc »

Rave

  • Full Member
  • ***
  • Posts: 151
Re: Writing desktop-enviroinment in Lazarus
« Reply #2 on: November 15, 2011, 08:48:27 am »
I don't think I *HAVE* to write external taskbar program. KDE for instance has taskbar/panel functionality built-in directly into plasma which manages also desktop icons, etc.

What I need are commands to retrieve icons of currently running programs as TPicture and functions to manage systray.

Also my DE is supposed to look and feel like Haiku, something like XPDE (google it) which resembles exactly Windows XP, though my DE will resemble Haiku, so no customization other than it is possible in Haiku.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3537
Re: Writing desktop-enviroinment in Lazarus
« Reply #3 on: November 15, 2011, 09:44:04 am »
I don't think I *HAVE* to write external taskbar program. KDE for instance has taskbar/panel functionality built-in directly into plasma which manages also desktop icons, etc.

I ment external because the main executable from fpwm is the window decorator. So a second executable would manage the taskbar and desktop icons, etc.

Quote
What I need are commands to retrieve icons of currently running programs as TPicture and functions to manage systray.

No such commands exist you have to write them using X11. Check how KDE or other window managers do it.

Quote
Also my DE is supposed to look and feel like Haiku, something like XPDE (google it) which resembles exactly Windows XP, though my DE will resemble Haiku, so no customization other than it is possible in Haiku.

My point was that one can separate the logic of how the window manager works from its look, so we can share the generic code and then we can have 2 looks. My point was that the generic code which can be shared is huge in comparison to the code which gives the look, and by good design one should make the look separate from the general code.
« Last Edit: November 15, 2011, 09:53:27 am by felipemdc »

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Writing desktop-enviroinment in Lazarus
« Reply #4 on: November 15, 2011, 09:56:15 am »
Seems like felipe gave some good advice - it beats having to start everything from scratch, so you can cocentrate on the mor important/difficult parts ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Rave

  • Full Member
  • ***
  • Posts: 151
Re: Writing desktop-enviroinment in Lazarus
« Reply #5 on: November 15, 2011, 07:28:36 pm »
Maybe. But my WM would use Metacity as window decorator (with possibility of change to KWin or even fpwm). Also KDE/GNOME/XFCE/etc. are written in C++, and I can't C well ;).

Hm... I think I may just download XPDE sources. It's written in Kylix, has taskbar and systray areas, and since Kylix is basically Delphi for Linux...

jma_sp

  • Full Member
  • ***
  • Posts: 128
  • El conocimiento si ocupa lugar.
Re: Writing desktop-enviroinment in Lazarus
« Reply #6 on: March 24, 2017, 09:24:06 am »
For icons on desktop and backgroung idesk is a good option.
Debian 8.6 - (JWM/ROX/iDesk) - Devuan Jessie 1.0 ( without systemd ) - Puppy -  Quirky Xerus 8.2 - Windows XP - ReactOS 0.4.xx  - FreeDos - OctaOS - KolibriOS

tr_escape

  • Sr. Member
  • ****
  • Posts: 280
  • sector name toys
    • Github:
Re: Writing desktop-enviroinment in Lazarus
« Reply #7 on: March 24, 2017, 02:19:32 pm »
Actually this thread is an old but I never heard about window manager created by fpc.

Also I tried this project with Xnest and Xephyr with my linux expert colleuge , it is worked but only created empty windows.

Note: This experiment worked with Linux Mint in Virtual Box.
« Last Edit: March 24, 2017, 02:52:18 pm by tr_escape »

Graeme

  • Hero Member
  • *****
  • Posts: 1414
    • Graeme on the web
Re: Writing desktop-enviroinment in Lazarus
« Reply #8 on: March 24, 2017, 04:47:21 pm »
Also try the "oldfpwm" directory - that was the initial version before the rewrite, and also the screenshot you see in the wiki page.

For more inspiration, and possible lots of code you could port from Kylix 3 to Lazarus or fpGUI... Take a look at XPde. I used to run that as my desktop environment for quite some time (years back of course), and it was 100% developed in Kylix 3, so all the source code is in Object Pascal. It even included many tools like a Control Panel, Calculator, System/Process Monitor, File Manager etc

  http://xpde.holobit.net/
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus