On Wed, Oct 29, 2014 at 04:35:30PM +0000, Michael Treibton wrote:
> hi,
> 
> Again in this TODO file there are these points -
> 
>    - Don't use typedefs for structs:
>         - Opaqueness is not useful here!
>             - 'struct foo' versus 'foo_t' or 'Foo' as the type.
>             - Will allow for reducing the number of structs used as the main
>               API, and will allow for better streamlining and accessing.
>         - There's a lot of macro #defines for accessing struct members,
>           presumably to hide the type; that's usually OK, but I'd like to
>           see these go away.  FW and Decor are good examples of this!  I'd
>           rather see more exposed functions to replace these.  The API will
>           need discussion.
> 
> what does this mean? i like macros for accessing things in a struct so
> that if the item in the struct changes then nothing gets to change.

We're talking mostly about the fields in the style and window
structures here.  I've introduced these macros during the "grand
style flag rewrite" (tm) to put a layer of abstraction between the
style structure and its users.  While many macros (but not all)
are trivial (see style.h and window_flags.h), the macros help to
hide the actual implementation iof styles (flags, set bit,
default value and change bit); only the style related code knows
about the implementation.  I would not give up that separation
without need because for a rewrite it will come in handy (I know
what I talk about; having to deal with hundreds of style flag
users all over the old code was a lot of work).

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt

Reply via email to