Back to index

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

Go to the source code of this file.

Functions

static G_BEGIN_DECLS void interfaceInitCB (AtkValueIface *aIface)
static void getCurrentValueCB (AtkValue *obj, GValue *value)
static void getMaximumValueCB (AtkValue *obj, GValue *value)
static void getMinimumValueCB (AtkValue *obj, GValue *value)
static gboolean setCurrentValueCB (AtkValue *obj, const GValue *value)

Function Documentation

void getCurrentValueCB ( AtkValue *  obj,
GValue *  value 
) [static]

Definition at line 101 of file nsMaiInterfaceValue.cpp.

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

    nsCOMPtr<nsIAccessibleValue> accValue;
    accWrap->QueryInterface(NS_GET_IID(nsIAccessibleValue),
                            getter_AddRefs(accValue));
    if (!accValue)
        return;

    memset (value,  0, sizeof (GValue));
    double accDouble;
    if (NS_FAILED(accValue->GetCurrentValue(&accDouble)))
        return;
    g_value_init (value, G_TYPE_DOUBLE);
    g_value_set_double (value, accDouble);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void getMaximumValueCB ( AtkValue *  obj,
GValue *  value 
) [static]

Definition at line 122 of file nsMaiInterfaceValue.cpp.

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

    nsCOMPtr<nsIAccessibleValue> accValue;
    accWrap->QueryInterface(NS_GET_IID(nsIAccessibleValue),
                            getter_AddRefs(accValue));
    if (!accValue)
        return;

    memset (value,  0, sizeof (GValue));
    double accDouble;
    if (NS_FAILED(accValue->GetMaximumValue(&accDouble)))
        return;
    g_value_init (value, G_TYPE_DOUBLE);
    g_value_set_double (value, accDouble);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void getMinimumValueCB ( AtkValue *  obj,
GValue *  value 
) [static]

Definition at line 143 of file nsMaiInterfaceValue.cpp.

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

    nsCOMPtr<nsIAccessibleValue> accValue;
    accWrap->QueryInterface(NS_GET_IID(nsIAccessibleValue),
                            getter_AddRefs(accValue));
    if (!accValue)
        return;

    memset (value,  0, sizeof (GValue));
    double accDouble;
    if (NS_FAILED(accValue->GetMinimumValue(&accDouble)))
        return;
    g_value_init (value, G_TYPE_DOUBLE);
    g_value_set_double (value, accDouble);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void interfaceInitCB ( AtkValueIface *  aIface) [static]

Definition at line 88 of file nsMaiInterfaceValue.cpp.

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

    aIface->get_current_value = getCurrentValueCB;
    aIface->get_maximum_value = getMaximumValueCB;
    aIface->get_minimum_value = getMinimumValueCB;
    aIface->set_current_value = setCurrentValueCB;
}

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean setCurrentValueCB ( AtkValue *  obj,
const GValue *  value 
) [static]

Definition at line 164 of file nsMaiInterfaceValue.cpp.

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

    nsCOMPtr<nsIAccessibleValue> accValue;
    accWrap->QueryInterface(NS_GET_IID(nsIAccessibleValue),
                            getter_AddRefs(accValue));
    NS_ENSURE_TRUE(accValue, FALSE);

    PRBool aBool;
    double accDouble;
    accDouble = g_value_get_double (value);
    accValue->SetCurrentValue(accDouble, &aBool);
    return aBool;
}

Here is the call graph for this function:

Here is the caller graph for this function: