Class: XCB::GetFontPathReply

Inherits:
Object
  • Object
show all
Defined in:
ext/xproto.c

Instance Method Summary collapse

Instance Method Details

#pathObject



3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
# File 'ext/xproto.c', line 3894

static VALUE
r_XCB_GetFontPathReply_get_path(VALUE r_self)
{
	xcb_get_font_path_reply_t *reply;
	Data_Get_Struct(r_self, xcb_get_font_path_reply_t, reply);
	xcb_str_iterator_t iterator = xcb_get_font_path_path_iterator(reply);
	VALUE r_path = rb_ary_new();
	while (iterator.rem != 0) {
		xcb_str_t *data = malloc(sizeof(xcb_str_t));
		if (data == NULL)
			rb_raise(rb_eNoMemError, "NoMemoryError");
		VALUE r_data = Data_Wrap_Struct(r_XCB_STR, NULL, NULL, data);
		*data = *iterator.data;
		rb_ary_push(r_path, r_data);
		xcb_str_next(&iterator);
	}
	return r_path;
}

#path_lenObject



3887
3888
3889
3890
3891
3892
3893
# File 'ext/xproto.c', line 3887

static VALUE
r_XCB_GetFontPathReply_get_path_len(VALUE r_self)
{
	xcb_get_font_path_reply_t *reply;
	Data_Get_Struct(r_self, xcb_get_font_path_reply_t, reply);
	return INT2FIX(reply->path_len);
}