Sha256: 45b9ea7893d7879244031087b2f43d2605f0d54ec59ba32b9bc0356195c64049

Contents?: true

Size: 1.54 KB

Versions: 29

Compression:

Stored size: 1.54 KB

Contents

/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
/*
 *  Copyright (C) 2015  Ruby-GNOME2 Project Team
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *  MA  02110-1301  USA
 */

#include "rbgprivate.h"

#define RG_TARGET_NAMESPACE cBinding

#define _SELF(object) G_BINDING(RVAL2GOBJ(self))

#if GLIB_CHECK_VERSION(2, 38, 0)
static VALUE
rg_unbind(VALUE self)
{
    GBinding *binding = _SELF(self);
    GObject *source;
    VALUE rb_source;

    source = g_binding_get_source(binding);
    rb_source = GOBJ2RVAL(source);
    rbgobj_object_remove_relative(rb_source, self);
    g_binding_unbind(binding);

    return self;
}
#endif

void
Init_gobject_gbinding(void)
{
#if GLIB_CHECK_VERSION(2, 26, 0)
    VALUE RG_TARGET_NAMESPACE;

    RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_BINDING, "Binding", mGLib);
#endif

#if GLIB_CHECK_VERSION(2, 38, 0)
    RG_DEF_METHOD(unbind, 0);
#endif
}

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
glib2-3.4.3 ext/glib2/rbgobj_binding.c
glib2-3.4.2 ext/glib2/rbgobj_binding.c
glib2-3.4.1 ext/glib2/rbgobj_binding.c
glib2-3.4.0 ext/glib2/rbgobj_binding.c
glib2-3.3.9 ext/glib2/rbgobj_binding.c
glib2-3.3.8 ext/glib2/rbgobj_binding.c
glib2-3.3.7 ext/glib2/rbgobj_binding.c
glib2-3.3.6 ext/glib2/rbgobj_binding.c
glib2-3.3.5 ext/glib2/rbgobj_binding.c
glib2-3.3.4 ext/glib2/rbgobj_binding.c
glib2-3.3.3 ext/glib2/rbgobj_binding.c
glib2-3.3.2 ext/glib2/rbgobj_binding.c
glib2-3.3.1 ext/glib2/rbgobj_binding.c
glib2-3.3.0 ext/glib2/rbgobj_binding.c
glib2-3.2.9-x64-mingw32 ext/glib2/rbgobj_binding.c
glib2-3.2.9-x86-mingw32 ext/glib2/rbgobj_binding.c
glib2-3.2.9 ext/glib2/rbgobj_binding.c
glib2-3.2.8-x64-mingw32 ext/glib2/rbgobj_binding.c
glib2-3.2.8-x86-mingw32 ext/glib2/rbgobj_binding.c
glib2-3.2.8 ext/glib2/rbgobj_binding.c