# GtkSourceView2 bindings

**URL:** <https://www.ruby-forum.com/t/gtksourceview2-bindings/142295>\
**Category:** Ruby-Gnome 2\
**Created:** [July 6, 2008, 9:32am UTC](https://www.ruby-forum.com/t/gtksourceview2-bindings/142295 "2008-07-06T09:32:02Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![yselkowitz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/b19c9b/32.png) [@yselkowitz](https://www.ruby-forum.com/u/yselkowitz)\
**Post date:** [July 6, 2008, 9:32am UTC](https://www.ruby-forum.com/t/gtksourceview2-bindings/142295/1 "2008-07-06T09:32:02Z")

</div>

I have put together bindings for gtksourceview-2.2, based primarily on  
the existing bindings for 1.8. They are not 100% complete, but do  
include many of the new features in 2.x. They compile without any  
warnings on my platform, and the tests have been revised and are  
working.

This is the first Ruby bindings I have ever worked on. If the existing  
gtksourceview bindings maintainer wants to take these and work on the  
further so that they may be included in ruby-gnome2-all, I would be  
grateful. In any case, I would be happy to accept any comments from  
those who may be interested.

Yaakov  
Cygwin Ports

---

<div class="post-metadata">

**Author:** ![yselkowitz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/b19c9b/32.png) [@yselkowitz](https://www.ruby-forum.com/u/yselkowitz)\
**Post date:** [July 6, 2008, 2:51pm UTC](https://www.ruby-forum.com/t/gtksourceview2-bindings/142295/2 "2008-07-06T14:51:50Z")

</div>

Hi,

2008/7/6 Yaakov (cygwin ports) [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> those who may be interested.  
> Now, Ruby//GtkSourceView

---

<div class="post-metadata">

**Author:** ![yselkowitz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/b19c9b/32.png) [@yselkowitz](https://www.ruby-forum.com/u/yselkowitz)\
**Post date:** [July 6, 2008, 3:02pm UTC](https://www.ruby-forum.com/t/gtksourceview2-bindings/142295/3 "2008-07-06T15:02:58Z")

</div>

Hi,

2008/7/6 Yaakov (cygwin ports) [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> those who may be interested.  
> Now, Ruby/GtkSourceView has no maintainer. If you’re OK, could you  
> become the maintainer of Ruby/GtkSourceView after 0.17.0 release?  
> Your changes will be merged at the time.

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![yselkowitz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/b19c9b/32.png) [@yselkowitz](https://www.ruby-forum.com/u/yselkowitz)\
**Post date:** [July 6, 2008, 10:50pm UTC](https://www.ruby-forum.com/t/gtksourceview2-bindings/142295/4 "2008-07-06T22:50:53Z")

</div>

Kouhei S. wrote:

> Now, Ruby/GtkSourceView has no maintainer. If you’re OK, could you  
> become the maintainer of Ruby/GtkSourceView after 0.17.0 release?  
> Your changes will be merged at the time.

I would have to work on it more before I would be comfortable  
considering that. In the meantime I would appreciate one of the regular  
maintainers looking it over for quality and other improvements, as well  
as the naming of methods (particularly getters).

This is a very different API than the existing gtksourceview bindings,  
due to the changes in the C library from 1.8 to 2.x. Do you intend to  
have these replace gtksourceview, or be separate bindings as  
gtksourceview2?

Yaakov  
Cygwin Ports

---

<div class="post-metadata">

**Author:** ![yselkowitz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/b19c9b/32.png) [@yselkowitz](https://www.ruby-forum.com/u/yselkowitz)\
**Post date:** [July 7, 2008, 3:01pm UTC](https://www.ruby-forum.com/t/gtksourceview2-bindings/142295/5 "2008-07-07T15:01:06Z")

</div>

Yaakov (cygwin ports) wrote:

> This is a very different API than the existing gtksourceview bindings,  
> due to the changes in the C library from 1.8 to 2.x. Do you intend to  
> have these replace gtksourceview, or be separate bindings as  
> gtksourceview2?

Unless the new version is 100% compatible to all programs which use the  
1.x bindings, there would be separate bindings for 2.x version.  
Otherwise backward compatibility would be broken with a new release of  
ruby-gnome2 and programs won’t run. I’d like to avoid that.

Joachim

---

<div class="post-metadata">

**Author:** ![yselkowitz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/b19c9b/32.png) [@yselkowitz](https://www.ruby-forum.com/u/yselkowitz)\
**Post date:** [July 8, 2008, 6:01pm UTC](https://www.ruby-forum.com/t/gtksourceview2-bindings/142295/6 "2008-07-08T18:01:31Z")

</div>

Kouhei S. wrote:

> I found some methods that isn’t applied our naming rules:  
> [snip]

Thank you for the link. I’ve fixed these accordingly.

> It seems that separate bindings are better.

FWIW I agree. These are quite different APIs, and 1.8 is still in use  
right now.

I’ve worked on this some more:

- coverage should now be 100%;
- #ifdef’ed new APIs in 2.2, so it should build with 2.0 (not tested);
- removed methods which can now be called directly with GObject  
properties;
- minor enhancements to samples.

This builds without warnings on Cygwin and the tests run correctly. I  
would appreciate any comments, and if found acceptable, I would like to  
see it added to Ruby-GNOME2.

Yaakov  
Cygwin Ports

---

<div class="post-metadata">

**Author:** ![yselkowitz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/b19c9b/32.png) [@yselkowitz](https://www.ruby-forum.com/u/yselkowitz)\
**Post date:** [July 7, 2008, 3:16pm UTC](https://www.ruby-forum.com/t/gtksourceview2-bindings/142295/7 "2008-07-07T15:16:12Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“Re: [ruby-gnome2-devel-en] GtkSourceView2 bindings” on Sun, 6 Jul  
2008 22:50:53 +0200,  
“Yaakov (cygwin ports)” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I would have to work on it more before I would be comfortable  
> considering that. In the meantime I would appreciate one of the regular  
> maintainers looking it over for quality and other improvements, as well  
> as the naming of methods (particularly getters).

I found some methods that isn’t applied our naming rules:

rb\_define\_method (clang, “metadata”, sourcelanguage\_get\_metadata, 1);  
rb\_define\_method (clang, “style\_name”, sourcelanguage\_get\_style\_name,  
1);  
rb\_define\_method (csssm, “scheme”, sssm\_get\_scheme, 1);

[http://ruby-gnome2.sourceforge.jp/hiki.cgi?Naming+and+Conversion+Rules#Accessors+(Setter%2FGetter+methods)](http://ruby-gnome2.sourceforge.jp/hiki.cgi?Naming+and+Conversion+Rules#Accessors+%28Setter%2FGetter+methods%29)

> This is a very different API than the existing gtksourceview bindings,  
> due to the changes in the C library from 1.8 to 2.x. Do you intend to  
> have these replace gtksourceview, or be separate bindings as  
> gtksourceview2?

It seems that separate bindings are better.

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![yselkowitz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/b19c9b/32.png) [@yselkowitz](https://www.ruby-forum.com/u/yselkowitz)\
**Post date:** [July 10, 2008, 1:44am UTC](https://www.ruby-forum.com/t/gtksourceview2-bindings/142295/8 "2008-07-10T01:44:24Z")

</div>

Hi,

2008/7/9 Yaakov (cygwin ports) [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> This builds without warnings on Cygwin and the tests run correctly. I  
> would appreciate any comments, and if found acceptable, I would like to  
> see it added to Ruby-GNOME2.

Could you tell me your [sourceforge.net](http://sourceforge.net) account name?

IMHO (I’m not the release manager. So this is not my business…),  
your bindings may not be included in the next Ruby-GNOME release but  
they will be included in the future releases. I think that it’s  
important  
releasing new version as soon as possible because the current version  
was released about 1.5 years ago.

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![yselkowitz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/b19c9b/32.png) [@yselkowitz](https://www.ruby-forum.com/u/yselkowitz)\
**Post date:** [July 10, 2008, 12:53pm UTC](https://www.ruby-forum.com/t/gtksourceview2-bindings/142295/9 "2008-07-10T12:53:08Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“Re: [ruby-gnome2-devel-en] GtkSourceView2 bindings” on Thu, 10 Jul  
2008 04:11:08 +0200,  
“Yaakov (cygwin ports)” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Could you tell me your [sourceforge.net](http://sourceforge.net) account name?
> 
> yselkowitz

I’ve add you to the Ruby-GNOME2 project.  
Welcome!

You can import your bindings into gtksourceview2 directory.

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![yselkowitz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/b19c9b/32.png) [@yselkowitz](https://www.ruby-forum.com/u/yselkowitz)\
**Post date:** [July 10, 2008, 4:11am UTC](https://www.ruby-forum.com/t/gtksourceview2-bindings/142295/10 "2008-07-10T04:11:08Z")

</div>

Kouhei S. wrote:

> Could you tell me your [sourceforge.net](http://sourceforge.net) account name?

yselkowitz

> IMHO (I’m not the release manager. So this is not my business…),  
> your bindings may not be included in the next Ruby-GNOME release but  
> they will be included in the future releases. I think that it’s  
> important releasing new version as soon as possible because the  
> current version was released about 1.5 years ago.

I understand, but if that’s the case I hope it won’t be another 1.5  
years. 🙂

Yaakov  
Cygwin Ports

---

<div class="post-metadata">

**Author:** ![yselkowitz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/b19c9b/32.png) [@yselkowitz](https://www.ruby-forum.com/u/yselkowitz)\
**Post date:** [July 11, 2008, 9:49pm UTC](https://www.ruby-forum.com/t/gtksourceview2-bindings/142295/11 "2008-07-11T21:49:34Z")

</div>

Kouhei S. wrote:

> I’ve add you to the Ruby-GNOME2 project.  
> Welcome!
> 
> You can import your bindings into gtksourceview2 directory.

Thank you; imported in r3261.

Yaakov  
Cygwin Ports
