Quote:
Originally Posted by phx
I don't have your source, but GetAttr() didn't change between V3.1 and V3.2, so I would just check if the first argument is ULONG (unsigned long), the second APTR (void *) and the third a pointer to an ULONG.
|
It "smells" like something is just wrong in my 3.2 setup for VBCC, and the symptom is this warning about pointer types.
I tried just casting them to their expected types, which usually is enough to shut the compiler up, but get exactly the same message. Here's the whole bit of code up to the warning:
Code:
// creates the gadgets needed for the window, returns pointer to the first gadget
struct Gadget* Window_CreateGadgets(WB2KWindow* the_surface)
{
struct Screen* scr = global_app->screen_;
unsigned long win_resize_gadget_width = 18;
unsigned long win_resize_gadget_height = 11; // Default size
struct Image* win_resize_image;
long window_content_top = scr->WBorTop + scr->RastPort.TxHeight + 1;
int button_top = scr->WBorTop + scr->Font->ta_YSize + 1;
//DEBUG_OUT(("create gadgets: rastport text height=%i, wbortop=%i", scr->RastPort.TxHeight, scr->WBorTop));
// create the shared bevel button image (object) that will be used by all bevel buttons in this window
// can't be global, because needs the drawinfo from the actual windows.
if ( (the_surface->bevel_button_image_ = NewObject(NULL, (STRPTR)"frameiclass",
IA_Recessed, FALSE,
IA_EdgesOnly, FALSE,
IA_FrameType, FRAME_BUTTON,
GA_DrawInfo, the_surface->draw_info_,
TAG_END)) == NULL)
{
LOG_ERR(("Window_CreateGadgets %d: Could not create bevel button image", __LINE__));
return NULL;
}
// figure out how big the Window sizing gadget image is, so we can have scrollbars not collide with it
if ( (win_resize_image = NewObject (NULL, (STRPTR)SYSICLASS, SYSIA_Which, SIZEIMAGE, SYSIA_DrawInfo, the_surface->draw_info_, TAG_DONE)) != NULL)
{
// Get size gadget geometry
GetAttr ((unsigned long)IA_Width, (APTR)win_resize_image, (unsigned long*)&win_resize_gadget_width);
GetAttr ((unsigned long)IA_Height, (APTR)win_resize_image, (unsigned long*)&win_resize_gadget_height);
// don't need the image object any more
DisposeObject (win_resize_image);
}
(definitely something is wrong in my setup, because this code compiles, but the window never actually fully opens, it hangs.)
For the layers_lib.sfd problem, I'll try using the .fd files to make that one. Might be a decent workaround until we know what those brackets are supposed to be doing.