Kouhei Sutou
kous****@users*****
Fri May 19 18:07:49 JST 2006
Index: kazehakase/ext/ruby/kz-rb-embed.c diff -u kazehakase/ext/ruby/kz-rb-embed.c:1.11 kazehakase/ext/ruby/kz-rb-embed.c:1.12 --- kazehakase/ext/ruby/kz-rb-embed.c:1.11 Tue Apr 25 12:47:35 2006 +++ kazehakase/ext/ruby/kz-rb-embed.c Fri May 19 18:07:49 2006 @@ -27,6 +27,7 @@ #define RVAL2KZBOOKMARK(obj) (KZ_BOOKMARK(RVAL2GOBJ(obj))) #define RVAL2KZNAVI(obj) (KZ_NAVI(RVAL2GOBJ(obj))) #define RVAL2KZNAVLINK(obj) (RVAL2GENUM(obj, KZ_TYPE_EMBED_NAV_LINK)) +#define RVAL2KZRF(obj) (RVAL2GENUM(obj, KZ_TYPE_EMBED_RELOAD_FLAG)) static VALUE rb_kz_embed_load_url(VALUE self, VALUE url) @@ -266,7 +267,7 @@ static VALUE rb_kz_embed_reload(VALUE self, VALUE flags) { - kz_embed_reload(_SELF(self), NUM2INT(flags)); + kz_embed_reload(_SELF(self), RVAL2KZRF(flags)); return self; } @@ -620,6 +621,11 @@ cKzEmbed = G_DEF_CLASS(KZ_TYPE_EMBED, "Embed", mKz); cKzMozEmbed = G_DEF_CLASS(KZ_TYPE_MOZ_EMBED, "MozEmbed", mKz); + G_DEF_CLASS(KZ_TYPE_EMBED_LOAD_FLAG, "EmbedLoadFlag", mKz); + G_DEF_CLASS(KZ_TYPE_EMBED_RELOAD_FLAG, "EmbedReloadFlag", mKz); + G_DEF_CLASS(KZ_TYPE_EMBED_GO_ACTION, "EmbedGoAction", mKz); + G_DEF_CLASS(KZ_TYPE_EMBED_NAV_LINK, "EmbedNavLink", mKz); + rb_define_method(cKzEmbed, "load_url", rb_kz_embed_load_url, 1); rb_define_method(cKzEmbed, "view_source", rb_kz_embed_view_source, 1);