当前位置: 首页>>代码示例>>C++>>正文


C++ G_CHILD_ADD函数代码示例

本文整理汇总了C++中G_CHILD_ADD函数的典型用法代码示例。如果您正苦于以下问题:C++ G_CHILD_ADD函数的具体用法?C++ G_CHILD_ADD怎么用?C++ G_CHILD_ADD使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了G_CHILD_ADD函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: tvc_pack_end

static VALUE
tvc_pack_end(VALUE self, VALUE cell, VALUE expand)
{
    G_CHILD_ADD(self, cell);
    gtk_tree_view_column_pack_end(_SELF(self), RVAL2CELLRENDERER(cell), RVAL2CBOOL(expand));
    return self;
}
开发者ID:benolee,项目名称:ruby-gnome2,代码行数:7,代码来源:rbgtktreeviewcolumn.c

示例2: rg_append_column

static VALUE
rg_append_column(VALUE self, VALUE column)
{
    G_CHILD_ADD(self, column);
    return INT2NUM(gtk_tree_view_append_column(_SELF(self), 
                                               TREEVIEW_COL(column)));
}
开发者ID:Vasfed,项目名称:ruby-gnome2,代码行数:7,代码来源:rbgtktreeview.c

示例3: rg_add

static VALUE
rg_add(VALUE self, VALUE tag)
{
    G_CHILD_ADD(self, tag);
    gtk_text_tag_table_add(_SELF(self), RVAL2GTKTEXTTAG(tag));
    return self;
}
开发者ID:Vasfed,项目名称:ruby-gnome2,代码行数:7,代码来源:rbgtk-text-tag-table.c

示例4: lstore_insert

/*
  Gtk::ListStore#insert(pos, val1 => 0, val2 => 2, ... )
 */
static VALUE
lstore_insert(int argc, VALUE *argv, VALUE self)
{
    VALUE position, values, result;
    struct lstore_insert_args args = { _SELF(self) };

    rb_scan_args(argc, argv, "11", &position, &values);
    args.position = NUM2INT(position);

    if (NIL_P(values)){
        gtk_list_store_insert(args.store, &args.iter, args.position);
    } else {
#if GTK_CHECK_VERSION(2,6,0)
        args.ary = rb_funcall(values, id_to_a, 0);
        args.n = RARRAY_LEN(args.ary);
        args.columns = g_new(gint, args.n);
        args.values = g_new0(GValue, args.n);

        rb_ensure(lstore_insert_body, (VALUE)&args,
                  lstore_insert_ensure, (VALUE)&args);
#else
        gtk_list_store_insert(args.store, &args.iter, args.position);
        rb_warn("Ignored 2nd argument under this environment, as it has been supported since GTK+-2.6.");
#endif
    }

    args.iter.user_data3 = args.store;

    result = GTKTREEITER2RVAL(&args.iter);

    G_CHILD_ADD(self, result);

    return result;
}
开发者ID:geoffyoungs,项目名称:ruby-gnome2,代码行数:37,代码来源:rbgtkliststore.c

示例5: rg_add_pad

/*
 * Method: add_pad(pad)
 * pad: the Gst::Pad to add to the element.
 *
 * Adds a pad (link point) to the element.  Pads are automatically activated
 * when the element is in state Gst::Element::PLAYING.
 *
 * Returns: self.
 */
static VALUE
rg_add_pad(VALUE self, VALUE pad)
{
    gst_element_add_pad(SELF(self), RGST_PAD(pad));
    G_CHILD_ADD(self, pad);
    return self;
}
开发者ID:masaakiaoyagi,项目名称:ruby-gnome2,代码行数:16,代码来源:rbgst-element.c

示例6: rg_attach

static VALUE
rg_attach(int argc, VALUE *argv, VALUE self)
{
    VALUE child, left, right, top, bottom;
    VALUE arg0, arg1, arg2, arg3;
    gint xspc, yspc;
    GtkAttachOptions xopt, yopt;

    xopt = yopt = GTK_EXPAND | GTK_FILL;
    xspc = yspc = 0;
    rb_scan_args(argc, argv, "54",
                 &child, &left, &right, &top, &bottom,
                 &arg0, &arg1, &arg2, &arg3);
    if (!NIL_P(arg0)) xopt = RVAL2GTKATTACHOPTIONS(arg0);
    if (!NIL_P(arg1)) yopt = RVAL2GTKATTACHOPTIONS(arg1);
    if (!NIL_P(arg2)) xspc = NUM2INT(arg2);
    if (!NIL_P(arg3)) yspc = NUM2INT(arg3);

    gtk_table_attach(_SELF(self),
                     RVAL2GTKWIDGET(child),
                     NUM2INT(left),NUM2INT(right),
                     NUM2INT(top),NUM2INT(bottom),
                     xopt, yopt, xspc, yspc);

    G_CHILD_ADD(self, child);

    return self;
}
开发者ID:Vasfed,项目名称:ruby-gnome2,代码行数:28,代码来源:rbgtk-table.c

示例7: rg_insert_action_group

static VALUE
rg_insert_action_group(VALUE self, VALUE action_group, VALUE pos)
{
    gtk_ui_manager_insert_action_group(_SELF(self), RVAL2GOBJ(action_group), NUM2INT(pos));
    G_CHILD_ADD(self, action_group);
    return self;
}
开发者ID:Mazwak,项目名称:ruby-gnome2,代码行数:7,代码来源:rbgtkuimanager.c

示例8: rg_prepend

static VALUE
rg_prepend(VALUE self, VALUE child)
{
    gtk_menu_shell_prepend(_SELF(self), RVAL2GTKWIDGET(child));
    G_CHILD_ADD(self, child);
    return self;
}
开发者ID:masaakiaoyagi,项目名称:ruby-gnome2,代码行数:7,代码来源:rbgtkmenushell.c

示例9: rg_set_value

static VALUE
rg_set_value(VALUE self, VALUE iter, VALUE column, VALUE value)
{
    GType gtype = gtk_tree_model_get_column_type(GTK_TREE_MODEL(RVAL2GOBJ(self)), NUM2INT(column));
    GValue gval = G_VALUE_INIT;
    g_value_init(&gval, gtype);

    rbgobj_rvalue_to_gvalue(value, &gval);

    G_CHILD_ADD(self, iter);
    G_CHILD_ADD(iter, value);

    gtk_tree_store_set_value(_SELF(self), RVAL2GTKTREEITER(iter), NUM2INT(column), &gval);

    g_value_unset(&gval);
    return self;
}
开发者ID:masaakiaoyagi,项目名称:ruby-gnome2,代码行数:17,代码来源:rbgtktreestore.c

示例10: rg_add_with_viewport

static VALUE
rg_add_with_viewport(VALUE self, VALUE other)
{
    gtk_scrolled_window_add_with_viewport(_SELF(self),
                                          RVAL2GTKWIDGET(other));
    G_CHILD_ADD(self, other);
    return self;
}
开发者ID:masaakiaoyagi,项目名称:ruby-gnome2,代码行数:8,代码来源:rbgtkscrolledwindow.c

示例11: textview_add_child_at_anchor

static VALUE
textview_add_child_at_anchor(VALUE self, VALUE child, VALUE anchor)
{
    G_CHILD_ADD(self, child);
    gtk_text_view_add_child_at_anchor(_SELF(self), GTK_WIDGET(RVAL2GOBJ(child)), 
                                      GTK_TEXT_CHILD_ANCHOR(RVAL2GOBJ(anchor)));
    return self;
}
开发者ID:geoffyoungs,项目名称:ruby-gnome2,代码行数:8,代码来源:rbgtktextview.c

示例12: textview_move_child

static VALUE
textview_move_child(VALUE self, VALUE child, VALUE xpos, VALUE ypos)
{
    G_CHILD_ADD(self, child);
    gtk_text_view_move_child(_SELF(self), GTK_WIDGET(RVAL2GOBJ(child)),
                             NUM2INT(xpos), NUM2INT(ypos));
    return self;
}
开发者ID:geoffyoungs,项目名称:ruby-gnome2,代码行数:8,代码来源:rbgtktextview.c

示例13: rg_insert

static VALUE
rg_insert(VALUE self, VALUE child, VALUE pos)
{
    gtk_menu_shell_insert(_SELF(self), RVAL2GTKWIDGET(child),
                          NUM2INT(pos));
    G_CHILD_ADD(self, child);
    return self;
}
开发者ID:masaakiaoyagi,项目名称:ruby-gnome2,代码行数:8,代码来源:rbgtkmenushell.c

示例14: rg_insert_media

/*
 * Insert media instance in media list on a position
 * The {#lock} should be held upon entering this function.
 *
 * @param [VLC::Media, Hash] media the media instance or specify media Hash (see {VLC::Media#initialize})
 * @param [Integer] pos position in array
 * @return [VLC::Media] the media instance
 * @raise [ArgumentError] Invalid or unsupported arguments
 * @todo fixme
 */
static VALUE
rg_insert_media(VALUE self, VALUE media, VALUE pos)
{
    media = get_media(self, media);
    if (libvlc_media_list_insert_media(_SELF(self), RVAL2VLCMEDIA(media), NUM2INT(pos)))
        rb_raise(rb_eArgError, "Invalid arguments.");
    G_CHILD_ADD(self, media);
    return media;
}
开发者ID:Vasfed,项目名称:ruby-gnome2,代码行数:19,代码来源:rbvlcmedialist.c

示例15: rg_attach_defaults

static VALUE
rg_attach_defaults(VALUE self, VALUE widget, VALUE left_attach, VALUE right_attach, VALUE top_attach, VALUE bottom_attach)
{
    gtk_table_attach_defaults(_SELF(self), RVAL2GTKWIDGET(widget),
                              NUM2UINT(left_attach), NUM2UINT(right_attach),
                              NUM2UINT(top_attach), NUM2UINT(bottom_attach));
    G_CHILD_ADD(self, widget);
    return self;
}
开发者ID:Vasfed,项目名称:ruby-gnome2,代码行数:9,代码来源:rbgtk-table.c


注:本文中的G_CHILD_ADD函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。