Xlib IDL for H/Direct?

1999-03-25 Thread Frank A. Christoph
Has anyone created an IDL file for Xlib? Alternatively, has anyone created one for H/Direct? I know that someone is working on GTK, but I'm interested in Xlib specifically. Also, I'm aware of Sigbjorn's Xlib interface in Haggis, but that one's reportedly still for GHC 0.29. :( BTW, it's not u

RE: Xlib IDL for H/Direct?

1999-03-25 Thread Sigbjorn Finne (Intl Vendor)
Frank A. Christoph <[EMAIL PROTECTED]> writes: > > Has anyone created an IDL file for Xlib? Alternatively, has > anyone created one for H/Direct? > > I know that someone is working on GTK, but I'm interested in > Xlib specifically. Also, I'm aware of Sigbjorn's Xlib > interface in Haggis, b

RE: Xlib IDL for H/Direct?

1999-03-26 Thread Manuel M. T. Chakravarty
"Sigbjorn Finne (Intl Vendor)" <[EMAIL PROTECTED]> wrote, [...lots of stuff deleted...] > > A couple of things: > [...] > - support Manuel's GTK+ efforts, if possible; Xlib is low-level, and GTK+ > (and its Glib) does hold out the promise of being cross-platform one > day soon. I will provi

Re: Xlib IDL for H/Direct?

1999-03-26 Thread Sven Panne
"Manuel M. T. Chakravarty" wrote: > [...] That is quite important as GTK+ requires the programmer to > directly access GDK for things like using alternative input > devices (eg, graphic tablets) and using rendering libraries > like Sven's OpenGL binding. OK, OK, the discreet hint has been underst

Re: Xlib IDL for H/Direct?

1999-03-29 Thread Manuel M. T. Chakravarty
Sven Panne <[EMAIL PROTECTED]> wrote, > "Manuel M. T. Chakravarty" wrote: > > [...] That is quite important as GTK+ requires the programmer to > > directly access GDK for things like using alternative input > > devices (eg, graphic tablets) and using rendering libraries > > like Sven's OpenGL bin

Re: Xlib IDL for H/Direct?

1999-03-29 Thread Sven Panne
"Sigbjorn Finne (Intl Vendor)" wrote: > Sven Panne wrote: > > What's wrong with using Green Card? Its %enum generates the desired > > mappings automatically and consistently. AFAIK, this type safety is > > something even IDL compilers don't do for you. > > Use whatever works best for you, but I'm

RE: Xlib IDL for H/Direct?

1999-03-29 Thread Sigbjorn Finne (Intl Vendor)
> Sven Panne [mailto:[EMAIL PROTECTED]] writes: > > "Sigbjorn Finne (Intl Vendor)" wrote: > > Sven Panne wrote: > > > What's wrong with using Green Card? Its %enum generates > > > the desired mappings automatically and consistently. AFAIK, > > > this type safety is something even IDL compiler

Re: Xlib IDL for H/Direct?

1999-03-29 Thread Sven Panne
"Sigbjorn Finne (Intl Vendor)" wrote: > You could use 'const's for this, but I'd suggest using an > 'enum' decl in IDL instead. Uhmmm, I should have read the docs more closely... :-] But there's a little bug when using -fenum-instances (missing returns): ... marshallStatus :: Status -> P

RE: Xlib IDL for H/Direct?

1999-03-29 Thread Sigbjorn Finne (Intl Vendor)
Sven Panne <[EMAIL PROTECTED]> writes: > ... > > > (HDirect doesn't currently allow you to map enums to newtypes of Int > > (say), but it could. No big deal). > > Hmm, IMHO it's not enum that should be mapped to newtype but a simple > typedef: Enums have a certain bounded set of possible valu

RE: Xlib IDL for H/Direct?

1999-03-30 Thread Manuel M. T. Chakravarty
"Sigbjorn Finne (Intl Vendor)" <[EMAIL PROTECTED]> wrote, > > Sven Panne [mailto:[EMAIL PROTECTED]] writes: > > > > "Sigbjorn Finne (Intl Vendor)" wrote: > > > Sven Panne wrote: > > > > What's wrong with using Green Card? Its %enum generates > > > > the desired mappings automatically and consi

Re: Xlib IDL for H/Direct?

1999-03-30 Thread Sven Panne
"Manuel M. T. Chakravarty" wrote: > Isn't there still a difference? When the C-library changes > (ie, you get a new version) and the definition of `Status' > changes to [...] > The IDL binding would produce wrong code, but the Green Card > binding would still be correct. Right? Or do I miss som

Re: Xlib IDL for H/Direct?

1999-03-30 Thread Sven Panne
"Sigbjorn Finne (Intl Vendor)" wrote: > Manuel does highlight a problem, but it's an example of Bad Practice > on the part of the library provider - rejigging the ordering and mapping > of enumeration tags is a no-no if you care about backward compatibility. But there are libraries out there whic

RE: Xlib IDL for H/Direct?

1999-03-30 Thread Sigbjorn Finne (Intl Vendor)
Sven Panne <[EMAIL PROTECTED]> writes: > > > > [...] HDirect could generate output which delayed the > > binding of enum tags to values until the Haskell/C stubs are > > compiled, if this is a real problem. [...] > ... > > typedef enum { > ExitFailure = ``EXIT_FAILURE'', >

RE: Xlib IDL for H/Direct?

1999-03-31 Thread Manuel M. T. Chakravarty
"Sigbjorn Finne (Intl Vendor)" <[EMAIL PROTECTED]> wrote, [...] > Having a .h -> .idl route would be helpful (at least until .idl has > supplanted the use .h as a means to specify libs ;-), but I'm probably > not going to invest any more time developing HDirect (or GreenCard), > so if anyone feel

RE: Xlib IDL for H/Direct?

1999-03-30 Thread Sigbjorn Finne (Intl Vendor)
Sven Panne <[EMAIL PROTECTED]> writes: > > "Manuel M. T. Chakravarty" wrote: > > Isn't there still a difference? When the C-library changes > > (ie, you get a new version) and the definition of `Status' > > changes to [...] > > The IDL binding would produce wrong code, but the Green Card > > b

Re: Xlib IDL for H/Direct?

1999-03-31 Thread Manuel M. T. Chakravarty
[EMAIL PROTECTED] (Carl R. Witty) wrote, > Sven Panne <[EMAIL PROTECTED]> writes: > > > The Green Card binding will definitely be correct, but AFAIK the IDL > > binding will be not. This was one of my main motivations for preferring > > Green Card to H/Direct. To the IDL wizards: Is there a *sim

Re: Xlib IDL for H/Direct?

1999-03-31 Thread Manuel M. T. Chakravarty
Sven Panne <[EMAIL PROTECTED]> wrote, > "Manuel M. T. Chakravarty" wrote: > > Isn't there still a difference? When the C-library changes > > (ie, you get a new version) and the definition of `Status' > > changes to [...] > > The IDL binding would produce wrong code, but the Green Card > > bindin