Class: XCB::DEPTH
- Inherits:
-
Object
- Object
- XCB::DEPTH
- Defined in:
- ext/xproto.c
Instance Method Summary collapse
Instance Method Details
#depth ⇒ Object
207 208 209 210 211 212 213 |
# File 'ext/xproto.c', line 207
static VALUE
r_XCB_DEPTH_get_depth(VALUE r_self)
{
xcb_depth_t *depth;
Data_Get_Struct(r_self, xcb_depth_t, depth);
return INT2FIX(depth->depth);
}
|
#visuals ⇒ Object
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'ext/xproto.c', line 221
static VALUE
r_XCB_DEPTH_get_visuals(VALUE r_self)
{
xcb_depth_t *depth;
Data_Get_Struct(r_self, xcb_depth_t, depth);
xcb_visualtype_iterator_t iterator = xcb_depth_visuals_iterator(depth);
VALUE r_visuals = rb_ary_new();
while (iterator.rem != 0) {
xcb_visualtype_t *data = malloc(sizeof(xcb_visualtype_t));
if (data == NULL)
rb_raise(rb_eNoMemError, "NoMemoryError");
VALUE r_data = Data_Wrap_Struct(r_XCB_VISUALTYPE, NULL, NULL, data);
*data = *iterator.data;
rb_ary_push(r_visuals, r_data);
xcb_visualtype_next(&iterator);
}
return r_visuals;
}
|
#visuals_len ⇒ Object
214 215 216 217 218 219 220 |
# File 'ext/xproto.c', line 214
static VALUE
r_XCB_DEPTH_get_visuals_len(VALUE r_self)
{
xcb_depth_t *depth;
Data_Get_Struct(r_self, xcb_depth_t, depth);
return INT2FIX(depth->visuals_len);
}
|