Index: [thread] [date] [subject] [author]
  From: Marcus Sundberg <e94_msu@e.kth.se>
  To  : ggi-develop@eskimo.com
  Date: Tue, 14 Jul 1998 17:34:37 +0200

Re: New ggi_graphtype

Hartmut Niemann wrote:
> > typedef uint32 ggi_graphtype;
> >
> > #define GT_DEPTH_MASK         0x000000ff
> > ...
> > #define GT_SCHEME_SHIFT               (24)
> >
> > /* Macros to extract info from a ggi_graphtype. */
> > #define GT_DEPTH(x)           (((x) & GT_DEPTH_MASK) >> GT_DEPTH_SHIFT)
> > #define GT_ACCESS(x)          (((x) & GT_ACCESS_MASK) >> GT_ACCESS_SHIFT)
> > #define GT_SUBSCHEME(x)       ((x) & GT_SUBSCHEME_MASK)
> > #define GT_SCHEME(x)          ((x) & GT_SCHEME_MASK)
> >
> At least the GT_DEPTH should be made public, IMHO, and be guaranteed to work in the future (:-)

Yes, these macros were all made to be public. It's the only
recommended method for applications to check which mode they
actually got.

> > #ifdef NEED_GRAPHTYPE_SYMS
> > #define GRAPHTYPE(X) ("THIS CODE NEEDS FIXING FOR THE NEW GT_* SCHEME!")
> > #endif
> Forget this GRAPHTYPE macro, I was probably the only user anyway ...
> I vote for: delete it entirely.

Ok, will do that.

> > My comments:
> > * Changing GGI_AUTO to 0 is genarally a Good Thing as it will simplify lots
> >   of things and doesn't break any source-compability.
> No. Use GT_AUTO at your will, but please not GGI_AUTO. Or is there a reason
> for using GGI_AUTO that I don't know?

First of all, as I have said it won't break sourcecompability for
anything, as 0 is invalid for all entries.
And the reason for changing it is that then we can have GGI_AUTO
for modesetting, all modesetting and nothing but modesetting.

Also it makes it easier if we would ever want to add more entries
to the ggi_mode struct. Having GGI_AUTO == 0 means that you can
use calloc() or memset() on ggi_mode, and you only have to care
about the entries you're interrested in, regardless of what the
mode-struct looks like.

//Marcus

Index: [thread] [date] [subject] [author]