"Chris Antos" wrote:
> >The only problem with _that_ is many of our types are intended to be
> >opaque.  That is, you should not know the structure of a WindowType, and we
> >can't make the Win... routines take a "WindowType *" paramater without
> >exposing WindowType.
> 
> perhaps the original intent was for the objects to be opaque.
> for that, the struct's should never have been in the publicly released
> header files.
> instead, the header file should have contained something like:
> 
>     typedef ListPtr VoidPtr;
> 
> this compiles and gives complete opacity.

You can also do:

        typedef struct ListType *ListPtr;

in the public header file without defining exactly what 'struct ListType'
contains.  You can then fully define 'struct ListType' in either a private
header file or in the body of your C program.

Reply via email to