Ejemplo n.º 1
0
static guint32
rbclt_alpha_func_wrapper_call (ClutterAlpha *alpha, gpointer user_data)
{
  RBCLTCallbackFunc *func = (RBCLTCallbackFunc *) user_data;
  VALUE arg = GOBJ2RVAL (alpha);

  return NUM2UINT (rbclt_callback_func_invoke (func, 1, &arg));
}
Ejemplo n.º 2
0
static gboolean
rbclt_model_call_filter_func (ClutterModel *model,
                              ClutterModelIter *iter,
                              gpointer user_data)
{
    VALUE argv[2];

    argv[0] = GOBJ2RVAL (model);
    argv[1] = GOBJ2RVAL (iter);

    return RTEST (rbclt_callback_func_invoke ((RBCLTCallbackFunc *) user_data,
                  2, argv)) ? TRUE : FALSE;
}
Ejemplo n.º 3
0
static gint
rbclt_model_call_sort_func (ClutterModel *model,
                            const GValue *a,
                            const GValue *b,
                            gpointer user_data)
{
    VALUE argv[3];

    argv[0] = GOBJ2RVAL (model);
    argv[1] = GVAL2RVAL (a);
    argv[2] = GVAL2RVAL (b);

    return NUM2INT (rbclt_callback_func_invoke ((RBCLTCallbackFunc *) user_data,
                    3, argv));
}