Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsMaiInterfaceComponent.cpp File Reference
#include "nsMaiInterfaceComponent.h"
#include "nsAccessibleWrap.h"

Go to the source code of this file.

Functions

static G_BEGIN_DECLS void interfaceInitCB (AtkComponentIface *aIface)
static AtkObject * refAccessibleAtPointCB (AtkComponent *aComponent, gint aAccX, gint aAccY, AtkCoordType aCoordType)
static void getExtentsCB (AtkComponent *aComponent, gint *aAccX, gint *aAccY, gint *aAccWidth, gint *aAccHeight, AtkCoordType aCoordType)
static gboolean grabFocusCB (AtkComponent *aComponent)

Function Documentation

void getExtentsCB ( AtkComponent *  aComponent,
gint *  aAccX,
gint *  aAccY,
gint *  aAccWidth,
gint *  aAccHeight,
AtkCoordType  aCoordType 
) [static]

Definition at line 148 of file nsMaiInterfaceComponent.cpp.

{
    nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aComponent));
    if (!accWrap)
        return;

    PRInt32 nsAccX, nsAccY, nsAccWidth, nsAccHeight;
    nsresult rv = accWrap->GetBounds(&nsAccX, &nsAccY,
                                           &nsAccWidth, &nsAccHeight);
    if (NS_FAILED(rv))
        return;
    // or ATK_XY_SCREEN  what is definition this in nsIAccessible?
    if (aCoordType == ATK_XY_WINDOW) {
        /* deal with the coord type */
    }

    *aAccX = nsAccX;
    *aAccY = nsAccY;
    *aAccWidth = nsAccWidth;
    *aAccHeight = nsAccHeight;
}

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean grabFocusCB ( AtkComponent *  aComponent) [static]

Definition at line 176 of file nsMaiInterfaceComponent.cpp.

{
    nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aComponent));
    NS_ENSURE_TRUE(accWrap, FALSE);

    nsresult rv = accWrap->TakeFocus();
    return (NS_FAILED(rv)) ? FALSE : TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void interfaceInitCB ( AtkComponentIface *  aIface) [static]

Definition at line 104 of file nsMaiInterfaceComponent.cpp.

{
    NS_ASSERTION(aIface, "Invalid Interface");
    if(!aIface)
        return;

    /*
     * Use default implementation in atk for contains, get_position,
     * and get_size
     */
    aIface->ref_accessible_at_point = refAccessibleAtPointCB;
    aIface->get_extents = getExtentsCB;
    aIface->grab_focus = grabFocusCB;
}

Here is the call graph for this function:

Here is the caller graph for this function:

AtkObject * refAccessibleAtPointCB ( AtkComponent *  aComponent,
gint  aAccX,
gint  aAccY,
AtkCoordType  aCoordType 
) [static]

Definition at line 120 of file nsMaiInterfaceComponent.cpp.

{
    nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aComponent));
    NS_ENSURE_TRUE(accWrap, nsnull);

    // or ATK_XY_SCREEN  what is definition this in nsIAccessible ???
    if (aCoordType == ATK_XY_WINDOW) {
        /* deal with the coord type */
    }

    nsCOMPtr<nsIAccessible> pointAcc;
    nsresult rv = accWrap->GetChildAtPoint(aAccX, aAccY, getter_AddRefs(pointAcc));
    if (NS_FAILED(rv))
        return nsnull;

    nsIAccessible *tmpAcc = pointAcc;
    nsAccessibleWrap *tmpAccWrap =
        NS_STATIC_CAST(nsAccessibleWrap *, tmpAcc);
    AtkObject *atkObj = tmpAccWrap->GetAtkObject();
    if (!atkObj)
        return nsnull;
    g_object_ref(atkObj);
    return atkObj;
}

Here is the call graph for this function:

Here is the caller graph for this function: