Ejemplo n.º 1
0
static int param_init(void) {
    if (!param) {
        return param_set_value("param");
    }

    return 0;
}
Ejemplo n.º 2
0
static int param_set(const char *buffer, const struct kernel_param *kp) {
    if (param) {
        kfree(param);
    }

    return param_set_value(buffer);
}
Ejemplo n.º 3
0
void
ScalarParam::param_set_range(gdouble min, gdouble max)
{
    this->min = min;
    this->max = max;

    param_set_value(value); // reset value to see whether it is in ranges
}
Ejemplo n.º 4
0
bool
ScalarParam::param_readSVGValue(const gchar * strvalue)
{
    double newval;
    unsigned int success = sp_svg_number_read_d(strvalue, &newval);
    if (success == 1) {
        param_set_value(newval);
        return true;
    }
    return false;
}
Ejemplo n.º 5
0
void
ScalarParam::param_set_range(gdouble min, gdouble max)
{
    // if you look at client code, you'll see that many effects
    // has a tendency to set an upper range of Geom::infinity().
    // Once again, in gtk2, this is not a problem. But in gtk3,
    // widgets get allocated the amount of size they ask for,
    // leading to excessively long widgets.

    if (min >= -SCALARPARAM_G_MAXDOUBLE) {
        this->min = min;
    } else {
        this->min = -SCALARPARAM_G_MAXDOUBLE;
    }
    if (max <= SCALARPARAM_G_MAXDOUBLE) {
        this->max = max;
    } else {
	this->max = SCALARPARAM_G_MAXDOUBLE;
    }

    param_set_value(value); // reset value to see whether it is in ranges
}
Ejemplo n.º 6
0
void
ScalarParam::param_set_default()
{
    param_set_value(defvalue);
}