Ben Combee wrote: > 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.
There are DFB++ and ++DFB. Look at their examples. They're quite different :) -- Best regards, Denis Oliver Kropp .------------------------------------------. | DirectFB - Hardware accelerated graphics | | http://www.directfb.org/ | "------------------------------------------" _______________________________________________ directfb-users mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
