Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 1999-04

gtk port questions

8 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mike Z.

Well, I've started the port and as anticipated I've got some questions. Please be patient with me - I'm a quick study and learn well by example. By the time this is done I might even understand what I'm doing...

I'm working under Win32 (my linux box is running an FTP server on a 486-66 and I try to avoid using it for other purposes). Feel free to answer with brevity, I'll let you know if I'm missing something. Thanks in advance!

1. The h2pas.exe (12/21/98 version) seems to do nothing. I've tried the syntax: h2pas gtkbbox.h gtkbbox.pp and I'm just returned to the command prompt. I downloaded h2pas from apparently the original author (6/9/95 version) and it works. Should I be using the version supplied with fpc and any thoughts on why it doesn't work?

2. Regarding this code snippet from the .pp file:

{$ifndef gtk_include_files}
  {$define read_interface}
  {$define
read_implementation}
{$endif not gtk_include_files}
{$ifndef
gtk_include_files}
  unit gtkbbox;
  interface
[snip]

I see these directives in all the units. I'll assume they're necessary but I'm not clear on when gtk_include_files would be defined.

3. Compiler directives in the C headers are ignored in the pp units. Correct?

4. A C struct is equivalent to a pascal record? The C typedef struct statements aren't used in pascal?

5. Is there an easy way to determine what needs to be in the Uses clause of the pp units?

6. These types seem frequently defined:

  Type
    PLongint  = ^Longint;
    PByte     = ^Byte;
    PWord     =
^Word;
    PINteger  = ^Integer;
    PCardinal = ^Cardinal;
    PReal     =
^Real;
    PDouble   = ^Double;

while PWord isn't used, for example, in gtkbbox.pp. In this case, PWord doesn't need to be typed, correct? You're just throwing them all in for convenience?

Thanks again for any tips. Once I get rolling I won't be quite the irritant :)

Mike Z.

Reply by email

Cliff Baeseman
to Peter Vreman: You can also make a diff file first and then use that diff file to find the changed…

Thanx Peter

Cliff

Earlier message 26 lines
-----Original Message----- From: Peter Vreman Sent: Friday, April 23, 1999 9:09 AM To: Cliff Baeseman Cc: Subject: RE: [lazarus] gtk port questions > Mike Z can you pass that h2c program to Do you wish to > collaborate on this with me? > > We will have to take the different units and split them up. So far I am just > doing a manual comparison to > the headers this is working fine because most of the units will not need any > major interface changes. You can also make a diff file first and then use that diff file to find the changed calls. The orginaly used .h files are available from the fpc CVS Peter _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject

Reply by email

Mike Z.
to Michael Van Canneyt: Just recompile it and it will work. (in rtl/utils/convert) The official distributed…

Thanks all for the help. It's appreciated.

Development on GTK and the win32 dll's seems to be happening pretty fast. It seems to me that we should settle on one set of code/dll's to base the fpc port on. One of my objectives is to end up with a win32/linux gui development tool, so I'm partial to sticking with gtk code which is supported by the win32 dll effort. Is this agreeable/reasonable?

The win32 dll's are based on gtk/glib 1.2. Currently on gtk.org there are versions 1.2.0, 1.2.1, and 1.2.2. For our purposes, does it matter which we use? Or another way, does 1.2.2 include fixes or new functions?

you wrote
Mike Z can you pass that h2c program to Do you wish to collaborate on this with me?

Do you need the linux or win32 or both?

Collaboration is great. Since everybody seems really busy, it might be easier to just work as we go instead of trying to divide the work up. This weekend I'll put a web page together with the base set of files we're all supposed to be working with as well as a list of work to be done and who's working on it. If anyone else wanted to jump in at that point it would be easy.

Show quoted text 5 lines
We will have to take the different units and split them up. So far I am just doing a manual comparison to the headers this is working fine because most of the units will not need any major interface changes.

Mike Z.

Reply by email

Michael Van Canneyt
to Mike Z.: Well, I've started the port and as anticipated I've got some questions. Please be patient…
Mike Z. wrote 13 lines
Well, I've started the port and as anticipated I've got some questions. Please be patient with me - I'm a quick study and learn well by example. By the time this is done I might even understand what I'm doing... I'm working under Win32 (my linux box is running an FTP server on a 486-66 and I try to avoid using it for other purposes). Feel free to answer with brevity, I'll let you know if I'm missing something. Thanks in advance! 1. The h2pas.exe (12/21/98 version) seems to do nothing. I've tried the syntax: h2pas gtkbbox.h gtkbbox.pp and I'm just returned to the command prompt. I downloaded h2pas from apparently the original author (6/9/95 version) and it works. Should I be using the version supplied with fpc and any thoughts on why it doesn't work?

Just recompile it and it will work. (in rtl/utils/convert) The official distributed version had a problem on win32 platforms :(

Show quoted text 18 lines
2. Regarding this code snippet from the .pp file: {$ifndef gtk_include_files} {$define read_interface} {$define read_implementation} {$endif not gtk_include_files} {$ifndef gtk_include_files} unit gtkbbox; interface [snip] I see these directives in all the units. I'll assume they're necessary but I'm not clear on when gtk_include_files would be defined.

The purpose of this is that you can compile the unit GTK such that it includes all the other units, thus making it 1 huge unit. The unit gtk therefore defines gtk_include_files, and simply includes all the others.

You can also compile the units separately. In that case you DON't define gtk_include_files, and each .pp file will act as a unit on it's own.

3. Compiler directives in the C headers are ignored in the pp units. Correct?

Correct.

4. A C struct is equivalent to a pascal record? The C typedef struct statements aren't used in pascal?

No.

5. Is there an easy way to determine what needs to be in the Uses clause of the pp units?

In the C header files, several includes are done. I think that most of them need gtktypes and gtkwidgets, most also use gdk and glib.

I always tried to compile the unit and added units as needed.

The problem of course doesn't exist if it is all 1 big unit...

Show quoted text 16 lines
6. These types seem frequently defined: Type PLongint = ^Longint; PByte = ^Byte; PWord = ^Word; PINteger = ^Integer; PCardinal = ^Cardinal; PReal = ^Real; PDouble = ^Double; while PWord isn't used, for example, in gtkbbox.pp. In this case, PWord doesn't need to be typed, correct? You're just throwing them all in for convenience?

Yes. Include these, they are generated by the H2pas program for convenience.

Thanks again for any tips. Once I get rolling I won't be quite the irritant :)

No complaints so far :)

Michael.

Reply by email

Cliff Baeseman
to Mike Z.: Thanks all for the help. It's appreciated. Development on GTK and the win32 dll's seems…

Mike if you could coordinate this it would be great I have my hands very full with lazarus but am more than willing to donate my time to the cause. I am sure some of the megido folks will help also but I could be wrong.

I believe a version 1.2 port should be done first and from there we can move along with the changes.

Cliff

Earlier message 46 lines
-----Original Message----- From: Mike Z. Sent: Friday, April 23, 1999 11:45 AM To: Subject: RE: [lazarus] gtk port questions Thanks all for the help. It's appreciated. Development on GTK and the win32 dll's seems to be happening pretty fast. It seems to me that we should settle on one set of code/dll's to base the fpc port on. One of my objectives is to end up with a win32/linux gui development tool, so I'm partial to sticking with gtk code which is supported by the win32 dll effort. Is this agreeable/reasonable? The win32 dll's are based on gtk/glib 1.2. Currently on gtk.org there are versions 1.2.0, 1.2.1, and 1.2.2. For our purposes, does it matter which we use? Or another way, does 1.2.2 include fixes or new functions? At 08:51 4/23/99 -0500, you wrote: >Mike Z can you pass that h2c program to Do you wish to >collaborate on this with me? > Do you need the linux or win32 or both? Collaboration is great. Since everybody seems really busy, it might be easier to just work as we go instead of trying to divide the work up. This weekend I'll put a web page together with the base set of files we're all supposed to be working with as well as a list of work to be done and who's working on it. If anyone else wanted to jump in at that point it would be easy. >We will have to take the different units and split them up. So far I am just >doing a manual comparison to >the headers this is working fine because most of the units will not need any >major interface changes. > Mike Z. _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject

Reply by email

Cliff Baeseman
to Michael Van Canneyt: Just recompile it and it will work. (in rtl/utils/convert) The official distributed…

Mike Z can you pass that h2c program to Do you wish to collaborate on this with me?

We will have to take the different units and split them up. So far I am just doing a manual comparison to
the headers this is working fine because most of the units will not need any major interface changes.

Cliff

Earlier message 110 lines
-----Original Message----- From: ]On Behalf Of Michael Van Canneyt Sent: Friday, April 23, 1999 3:14 AM To: Subject: Re: [lazarus] gtk port questions On Fri, 23 Apr 1999, Mike Z. wrote: > Well, I've started the port and as anticipated I've got some questions. > Please be patient with me - I'm a quick study and learn well by example. > By the time this is done I might even understand what I'm doing... > > I'm working under Win32 (my linux box is running an FTP server on a 486-66 > and I try to avoid using it for other purposes). Feel free to answer with > brevity, I'll let you know if I'm missing something. Thanks in advance! > > 1. The h2pas.exe (12/21/98 version) seems to do nothing. I've tried the > syntax: h2pas gtkbbox.h gtkbbox.pp and I'm just returned to the command > prompt. I downloaded h2pas from apparently the original author (6/9/95 > version) and it works. Should I be using the version supplied with fpc and > any thoughts on why it doesn't work? Just recompile it and it will work. (in rtl/utils/convert) The official distributed version had a problem on win32 platforms :( > > 2. Regarding this code snippet from the .pp file: > > {$ifndef gtk_include_files} > {$define read_interface} > {$define > read_implementation} > {$endif not gtk_include_files} > > {$ifndef > gtk_include_files} > > unit gtkbbox; > interface > [snip] > > I see these directives in all the units. I'll assume they're necessary but > I'm not clear on when gtk_include_files would be defined. The purpose of this is that you can compile the unit GTK such that it includes all the other units, thus making it 1 huge unit. The unit gtk therefore defines gtk_include_files, and simply includes all the others. You can also compile the units separately. In that case you DON't define gtk_include_files, and each .pp file will act as a unit on it's own. > 3. Compiler directives in the C headers are ignored in the pp units. Correct? Correct. > 4. A C struct is equivalent to a pascal record? The C typedef struct > statements aren't used in pascal? No. > 5. Is there an easy way to determine what needs to be in the Uses clause of > the pp units? In the C header files, several includes are done. I think that most of them need gtktypes and gtkwidgets, most also use gdk and glib. I always tried to compile the unit and added units as needed. The problem of course doesn't exist if it is all 1 big unit... > 6. These types seem frequently defined: > > Type > PLongint = ^Longint; > PByte = ^Byte; > PWord = > ^Word; > PINteger = ^Integer; > PCardinal = ^Cardinal; > PReal = > ^Real; > PDouble = ^Double; > > while PWord isn't used, for example, in gtkbbox.pp. In this case, PWord > doesn't need to be typed, correct? You're just throwing them all in for > convenience? Yes. Include these, they are generated by the H2pas program for convenience. > > Thanks again for any tips. Once I get rolling I won't be quite the > irritant :) No complaints so far :) Michael. _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject

Reply by email

Peter Vreman
to Cliff Baeseman
Show quoted text 7 lines
Mike Z can you pass that h2c program to Do you wish to collaborate on this with me? We will have to take the different units and split them up. So far I am just doing a manual comparison to the headers this is working fine because most of the units will not need any major interface changes.

You can also make a diff file first and then use that diff file to find the changed calls. The orginaly used .h files are available from the fpc CVS

Peter

Reply by email

Mike Z.
to Mike Z.: Well, I've started the port and as anticipated I've got some questions. Please be patient…
you wrote 11 lines
> > 1. The h2pas.exe (12/21/98 version) seems to do nothing. I've tried the > syntax: h2pas gtkbbox.h gtkbbox.pp and I'm just returned to the command > prompt. I downloaded h2pas from apparently the original author (6/9/95 > version) and it works. Should I be using the version supplied with fpc and > any thoughts on why it doesn't work? Just recompile it and it will work. (in rtl/utils/convert) The official distributed version had a problem on win32 platforms :(

I recompiled h2pas and the program runs (under both linux and win32) but always generates errors. For example, under linux:

Run time error 216 at 0x00000000
0xBFFFFFC1C
etc..
[snip]

The program will start and display the quick reference.

Any suggestions? If anyone wants to send a binary (win32 or linux) that might save some time.

Finally, which options should be used with h2pas? I know I'm being a bit lazy - just trying to save some time!

Once h2pas is working I think I'll be able to get the units updated pretty quickly.

Thanks.

Mike Z.

Reply by email