當前位置: 首頁>>代碼示例>>C++>>正文


C++ CSTR2RVAL函數代碼示例

本文整理匯總了C++中CSTR2RVAL函數的典型用法代碼示例。如果您正苦於以下問題:C++ CSTR2RVAL函數的具體用法?C++ CSTR2RVAL怎麽用?C++ CSTR2RVAL使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了CSTR2RVAL函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: rbatk_document_get_locale

static VALUE
rbatk_document_get_locale(VALUE self)
{
    return CSTR2RVAL(atk_document_get_locale(_SELF(self)));
}
開發者ID:geoffyoungs,項目名稱:ruby-gnome2,代碼行數:5,代碼來源:rbatkdocument.c

示例2: rg_accel_path

static VALUE
rg_accel_path(VALUE self)
{
    const gchar *quark_str = g_quark_to_string(_SELF(self)->accel_path_quark);
    return quark_str ? CSTR2RVAL(quark_str) : Qnil;
}
開發者ID:Mazwak,項目名稱:ruby-gnome2,代碼行數:6,代碼來源:rbgtk-accel-group-entry.c

示例3: translate_func

static gchar *
translate_func(const gchar *path, gpointer func)
{
    VALUE ret = rb_funcall((VALUE)func, id_call, 1, CSTR2RVAL(path));
    return (gchar *)RVAL2CSTR(ret);
}
開發者ID:geoffyoungs,項目名稱:ruby-gnome2,代碼行數:6,代碼來源:rbgtkactiongroup.c

示例4: device_name

/* Accessor */
static VALUE
device_name(VALUE self)
{
    return CSTR2RVAL(_SELF(self)->name);
}
開發者ID:geoffyoungs,項目名稱:ruby-gnome2,代碼行數:6,代碼來源:rbgdkdevice.c

示例5: ifact_s_path_from_widget

static VALUE
ifact_s_path_from_widget(VALUE self, VALUE widget)
{
    return CSTR2RVAL(gtk_item_factory_path_from_widget(RVAL2WIDGET(widget)));
}
開發者ID:benolee,項目名稱:ruby-gnome2,代碼行數:5,代碼來源:rbgtkitemfactory.c

示例6: rg_output_bin

static VALUE
rg_output_bin(VALUE self)
{
    return CSTR2RVAL(gtk_print_settings_get_output_bin(_SELF(self)));
}
開發者ID:msakai,項目名稱:ruby-gnome2,代碼行數:5,代碼來源:rbgtkprintsettings.c

示例7: ps_get

static VALUE
ps_get(VALUE self, VALUE key)
{
    return CSTR2RVAL(gtk_print_settings_get(_SELF(self), RVAL2CSTR(key)));
}
開發者ID:msakai,項目名稱:ruby-gnome2,代碼行數:5,代碼來源:rbgtkprintsettings.c

示例8: rg_description

static VALUE
rg_description(VALUE self)
{
    return CSTR2RVAL(gtk_recent_info_get_description(_SELF(self)));
}
開發者ID:Mazwak,項目名稱:ruby-gnome2,代碼行數:5,代碼來源:rbgtkrecentinfo.c

示例9: rg_mime_type

static VALUE
rg_mime_type(VALUE self)
{
    return CSTR2RVAL(gtk_recent_info_get_mime_type(_SELF(self)));
}
開發者ID:Mazwak,項目名稱:ruby-gnome2,代碼行數:5,代碼來源:rbgtkrecentinfo.c

示例10: rg_short_name

static VALUE
rg_short_name(VALUE self)
{
    return CSTR2RVAL(gtk_recent_info_get_short_name(_SELF(self)));
}
開發者ID:Mazwak,項目名稱:ruby-gnome2,代碼行數:5,代碼來源:rbgtkrecentinfo.c

示例11: rg_uri

static VALUE
rg_uri(VALUE self)
{
    return CSTR2RVAL(gtk_recent_info_get_uri(_SELF(self)));
}
開發者ID:Mazwak,項目名稱:ruby-gnome2,代碼行數:5,代碼來源:rbgtkrecentinfo.c

示例12: rg_last_application

static VALUE
rg_last_application(VALUE self)
{
    return CSTR2RVAL(gtk_recent_info_last_application(_SELF(self)));
}
開發者ID:Mazwak,項目名稱:ruby-gnome2,代碼行數:5,代碼來源:rbgtkrecentinfo.c

示例13: rb_gi_argument_to_ruby

VALUE
rb_gi_argument_to_ruby(GIArgument *argument, GITypeInfo *type_info)
{
    VALUE rb_argument = Qnil;
    GITypeTag type_tag;

    type_tag = g_type_info_get_tag(type_info);
    switch (type_tag) {
      case GI_TYPE_TAG_VOID:
        rb_argument = Qnil;
        break;
      case GI_TYPE_TAG_BOOLEAN:
        rb_argument = CBOOL2RVAL(argument->v_boolean);
        break;
      case GI_TYPE_TAG_INT8:
        rb_argument = INT2NUM(argument->v_int8);
        break;
      case GI_TYPE_TAG_UINT8:
        rb_argument = UINT2NUM(argument->v_uint8);
        break;
      case GI_TYPE_TAG_INT16:
        rb_argument = INT2NUM(argument->v_int16);
        break;
      case GI_TYPE_TAG_UINT16:
        rb_argument = UINT2NUM(argument->v_uint16);
        break;
      case GI_TYPE_TAG_INT32:
        rb_argument = INT2NUM(argument->v_int32);
        break;
      case GI_TYPE_TAG_UINT32:
        rb_argument = UINT2NUM(argument->v_uint32);
        break;
      case GI_TYPE_TAG_INT64:
        rb_argument = LONG2NUM(argument->v_int64);
        break;
      case GI_TYPE_TAG_UINT64:
        rb_argument = ULONG2NUM(argument->v_uint64);
        break;
      case GI_TYPE_TAG_FLOAT:
        rb_argument = DBL2NUM(argument->v_float);
        break;
      case GI_TYPE_TAG_DOUBLE:
        rb_argument = DBL2NUM(argument->v_double);
        break;
      case GI_TYPE_TAG_GTYPE:
        rb_argument = rbgobj_gtype_new(argument->v_size);
        break;
      case GI_TYPE_TAG_UTF8:
        rb_argument = CSTR2RVAL(argument->v_string);
        break;
      case GI_TYPE_TAG_FILENAME:
        /* TODO: set encoding */
        rb_argument = CSTR2RVAL(argument->v_string);
        break;
      case GI_TYPE_TAG_ARRAY:
        rb_argument = array_to_ruby(argument->v_pointer, type_info);
        break;
      case GI_TYPE_TAG_INTERFACE:
        rb_argument = interface_to_ruby(argument, type_info);
        break;
      case GI_TYPE_TAG_GLIST:
      case GI_TYPE_TAG_GSLIST:
      case GI_TYPE_TAG_GHASH:
        rb_raise(rb_eNotImpError, "TODO: GIArgument(unichar) -> Ruby");
        break;
      case GI_TYPE_TAG_ERROR:
        rb_argument = GERROR2RVAL(argument->v_pointer);
        break;
      case GI_TYPE_TAG_UNICHAR:
        rb_raise(rb_eNotImpError,
                 "TODO: GIArgument(%s) -> Ruby",
                 g_type_tag_to_string(type_tag));
        break;
      default:
        g_assert_not_reached();
        break;
    }

    return rb_argument;
}
開發者ID:Mazwak,項目名稱:ruby-gnome2,代碼行數:80,代碼來源:rb-gi-argument.c

示例14: rg_composite_name

static VALUE
rg_composite_name(VALUE self)
{
    return CSTR2RVAL(gtk_widget_get_composite_name(_SELF(self)));
}
開發者ID:adamhooper,項目名稱:ruby-gnome2,代碼行數:5,代碼來源:rbgtkwidget.c

示例15: rg_dither

static VALUE
rg_dither(VALUE self)
{
    return CSTR2RVAL(gtk_print_settings_get_dither(_SELF(self)));
}
開發者ID:msakai,項目名稱:ruby-gnome2,代碼行數:5,代碼來源:rbgtkprintsettings.c


注:本文中的CSTR2RVAL函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。