Forum: Ruby-Gnome 2 gtk3 Gdk::Window.create_cairo_contex replacement

4913bcb685792f601ae9813b4713abb9?d=identicon&s=25 Detlef Reichl (Guest)
on 2013-04-28 20:15
(Received via mailing list)
Hi,

with gtk3 Gdk::Window.create_cairo_contex is gone. The C implementation
of gdk3 has a gdk_cairo_* "namespace" for cairo related functions.

For the ruby implementation I think it is best to put the function

  cairo_t *gdk_cairo_create (GdkWindow *window);

which is a replacement for create_cairo_contex in

  Gdk::Window.cairo_create


any objections?

Cheers detlef
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2013-04-29 05:59
(Received via mailing list)
Hi,

In <517D6723.4010705@gmx.org>
  "[ruby-gnome2-devel-en] gtk3 Gdk::Window.create_cairo_contex
replacement" on Sun, 28 Apr 2013 20:14:59 +0200,
  Detlef Reichl <detlef.reichl@gmx.org> wrote:

> with gtk3 Gdk::Window.create_cairo_contex is gone. The C implementation
> of gdk3 has a gdk_cairo_* "namespace" for cairo related functions.
>
> For the ruby implementation I think it is best to put the function
>
>   cairo_t *gdk_cairo_create (GdkWindow *window);
>
> which is a replacement for create_cairo_contex in
>
>   Gdk::Window.cairo_create

Thanks, I didn't know about it.

I added Gdk::Window#create_cairo_context because:

  * The API is backward compatible. :-)
  * It is a natural that method name uses a verb.
    Using namespace (or prefix) as a method name is not
    Object Oriented programming way. It is a sign that we
    should break the object.


Thanks,
--
kou
4913bcb685792f601ae9813b4713abb9?d=identicon&s=25 Detlef Reichl (Guest)
on 2013-04-30 18:33
(Received via mailing list)
Hi,

Am 29.04.2013 05:58, schrieb Kouhei Sutou:
>>
>>   cairo_t *gdk_cairo_create (GdkWindow *window);
>>
>> which is a replacement for create_cairo_contex in
>>
>>   Gdk::Window.cairo_create
>
> Thanks, I didn't know about it.
>
> I added Gdk::Window#create_cairo_context because:

Thanks!

Cheers, detlef
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.