On 6/8/07, Chris Bore <[EMAIL PROTECTED]> wrote: > In the tutorial programs, the interface pointer is used in two places. > > For example: > > DirectFBCreate(&dfb); > ... > dfb->CreateSurface(dfb, &dsc, &primary); > > I am not sure why this is done. The syntax: > > dfb->CreateSurface( > > seems enough to dereference the function pointer and uniquely indicate the > instance.
This is C code. There's no automatic passing of the "this" pointer to the function, so while dfb->CreateSurface(...) would be sufficient to call CreateSurface, the function pointed to by the CreateSurface member wouldn't know what DFB instance to use. _______________________________________________ directfb-users mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
