コード例 #1
0
IPTR ImageClass__OM_NEW(Class *cl, Object *o, struct opSet *msg)
{
    struct Image *im;
    
    D(kprintf("ImageClass OM_NEW\n"));

    if (cl)
    {
	im = (struct Image *)DoSuperMethodA(cl, o, (Msg)msg);

	if(im)
	{
	    /*
	     * This is how Intuition knows an image is a boopsi
	     * object!
	     */
	    /*
	     * The instance object is contains cleared memory!
	     * memset ((void *)retval, 0, (cl->cl_InstOffset + cl->cl_InstSize));
	     */
	    im->Width = 80;
	    im->Height = 40;
	    im->Depth = CUSTOMIMAGEDEPTH;
	    
	    _om_set(cl, im, msg->ops_AttrList);
	    
	    return (IPTR)im;
	}
	else
	    return (IPTR)NULL;
    }
    else
	return (IPTR)NULL;
}
コード例 #2
0
IPTR ImageClass__OM_SET(Class *cl, struct Image *im, struct opSet *msg)
{
    D( kprintf("ImageClass OM_SET\n") );

    /*
     * Because we are a direct subclass of rootclass
     * which has no settable/gettable attributes we
     * we will NOT pass this method to our superclass!
     */
    return _om_set(cl, im, msg->ops_AttrList);
}
コード例 #3
0
ファイル: icclass.c プロジェクト: michalsc/AROS
IPTR ICClass__OM_SET(Class *cl, Object *o, struct opSet *msg)
{
    struct ICData *ic = INST_DATA(cl, o);
    struct IntuitionBase *IntuitionBase = (struct IntuitionBase *)cl->cl_UserData;

    DEBUG_IC(dprintf("dispatch_icclass: OM_SET\n"));
    _om_set(ic, msg->ops_AttrList, IntuitionBase);
    DEBUG_IC(dprintf("dispatch_icclass: OM_SET Map 0x%lx Target 0x%lx\n",ic->ic_Mapping,ic->ic_Target));
    
    return (IPTR)TRUE;
}
コード例 #4
0
ファイル: icclass.c プロジェクト: michalsc/AROS
IPTR ICClass__OM_NEW(Class *cl, Object *o, struct opSet *msg)
{
    IPTR retval;
    struct ICData *ic;
    struct IntuitionBase *IntuitionBase = (struct IntuitionBase *)cl->cl_UserData;
    
    DEBUG_IC(dprintf("dispatch_icclass: OM_NEW\n"));
    
    retval = DoSuperMethodA(cl, o, (Msg)msg);

    if (!retval) return (IPTR)FALSE;

    ic = INST_DATA(cl, retval);

    /* set some defaults */
    ic->ic_Target    = NULL;
    ic->ic_Mapping   = NULL;
    ic->ic_CloneTags = NULL;

    _om_set(ic, msg->ops_AttrList, IntuitionBase);
    
    return retval;
}