Lazarus
Installation => General => Topic started by: jose_filemaker on May 08, 2006, 06:13:36 pm
-
Hace mucho que no uso BeOS (hoy en día YelowTab), pero mi pregunta es si es posible compilar el LAZARUS para que funcione bajo este sistema operativo, o sobre el futuro HaikuOS (BeOS Open Source)
A simple question: Is posible to compile the lazarus source code for running under the BeOS platform (YellowTab, Haiku, ...)?
Sorry by my very poor english.
-
The first step is to get the Free Pascal Compiler running under BeOS. I don´t know if Free Pascal works without modifications under BeOS.
If Free Pascal doesn´t support BeOS yet you will need to write a Run-time library for BeOS so the compiler can work.
Next it´s necessary to see what visual widgetsets are supported under BeOS. If Gtk works on BeOS you can just use it for a quick start.
If not then you will need to write a new LCL interface. There is documentation about this on the wiki.
-
http://sf.net/projects/befpc
FreePascal 2.1.1 for BeOS/Zeta is now availble
-
Ok, so now you only need to create a new widgetset for Lazarus. =) There is a tutorial here:
http://wiki.lazarus.freepascal.org/index.php/LCL_Internals#How_to_create_a_new_Widgetset
-
Thanks, I'll try :-)
-
You will probably want to join the mailling list and ask Mattias to add a new directory on the lcl interfaces for beos. The directory should have the name of the utilized widgetset.
-
Another good idea: make sure the changes in for beos, that are on sourceforge are merged in the fpc SVN repository. Then other Lazarus developers can at least try cross-compilation even if they don't have beos installed.
-
Another good idea: make sure the changes in for beos, that are on sourceforge are merged in the fpc SVN repository. Then other Lazarus developers can at least try cross-compilation even if they don't have beos installed.
Yes, it was me, but I got logged out. :-(
-
I have one question about creating widgets. When I use for example Form1.Visible := True what method is activated in TWSCustomForm? I don't know how to handle this.
First screen (not to much but today I start working on this)
(http://img223.imageshack.us/img223/1668/16pa1.th.png) (http://img223.imageshack.us/my.php?image=16pa1.png)
-
I have one question about creating widgets. When I use for example Form1.Visible := True what method is activated in TWSCustomForm? I don't know how to handle this.
Maybe we should create a list of what is needed to implement each feature.
Visibility is implemented on 2 places.
* The first is for forms, this is what you are looking for. For forms you must implement a WinAPI function called ShowWindow. On Qt widgetset it is located at qtwinapi.inc file. On your code it will be located on a similar **winapi.inc file. Don´t forget to also add a header to the file **winapih.inc
Bellow is code that implements this function on the Qt widgetset. It should be very easy to understand and implement. You can also take a look how Gtk implements this.
{------------------------------------------------------------------------------
function ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean;
nCmdShow:
SW_SHOWNORMAL, SW_MINIMIZE, SW_SHOWMAXIMIZED
------------------------------------------------------------------------------}
function TQtWidgetSet.ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean;
var
Widget: QWidgetH;
begin
{$ifdef VerboseQtWinAPI}
WriteLn('WinAPI ShowWindow');
{$endif}
Result := False;
Widget := QWidgetH(hWnd);
// if Widget = nil then RaiseException('TQtWidgetSet.ShowWindow hWnd is nil');
case nCmdShow of
SW_SHOW: QWidget_setVisible(Widget, True);
SW_SHOWNORMAL: QWidget_showNormal(Widget);
SW_MINIMIZE: QWidget_setWindowState(Widget, QtWindowMinimized);
SW_SHOWMINIMIZED: QWidget_showMinimized(Widget);
SW_SHOWMAXIMIZED: QWidget_showMaximized(Widget);
SW_HIDE: QWidget_setVisible(Widget, False);
end;
Result := True;
end;
* - The second is for controls. You need to implement T**WSWinControl.ShowHide class function. Bellow is a sample code for Qt.
{------------------------------------------------------------------------------
Method: TQtWSWinControl.ShowHide
Params: AWinControl - the calling object
Returns: Nothing
Shows or hides a widget.
------------------------------------------------------------------------------}
class procedure TQtWSWinControl.ShowHide(const AWinControl: TWinControl);
begin
if AWinControl = nil then exit;
if not AWinControl.HandleAllocated then exit;
if AWinControl.HandleObjectShouldBeVisible then
QWidget_setVisible(TQtWidget(AWinControl.Handle).Widget, True)
else QWidget_setVisible(TQtWidget(AWinControl.Handle).Widget, False);
end;
-
Ok, I created a wiki page about this:
http://wiki.lazarus.freepascal.org/index.php/LCL_Internals#Implementing_visibility_for_forms_and_controls
You can also help me document what is needed to make each part working =)
A good documentation can make it much, much easier to write new widgetsets.
-
First screen (not to much but today I start working on this)
That´s great news!
Don´t hesitate to ask for more help =)