當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。