Class: X11::WindowManager::Client
- Inherits:
-
Object
- Object
- X11::WindowManager::Client
- Defined in:
- ext/x11_wrap.c
Instance Method Summary collapse
- #ban ⇒ Object
- #border ⇒ Object
- #border=(width) ⇒ Object
- #border_reset ⇒ Object
- #height ⇒ Object
- #height=(nv) ⇒ Object
- #name ⇒ Object
- #raise ⇒ Object
- #size ⇒ Object
- #size=(valarray) ⇒ Object
- #unban ⇒ Object
- #wid ⇒ Object
- #width ⇒ Object
- #width=(nv) ⇒ Object
- #window_class ⇒ Object
- #xpos ⇒ Object
- #xpos=(nv) ⇒ Object
- #ypos ⇒ Object
- #ypos=(nv) ⇒ Object
Instance Method Details
#ban ⇒ Object
509 510 511 512 513 514 |
# File 'ext/x11_wrap.c', line 509 static VALUE client_ban(VALUE self) { Client* c; Data_Get_Struct(self, Client, c); ban_client(c); return Qnil; } |
#border ⇒ Object
414 415 416 417 418 |
# File 'ext/x11_wrap.c', line 414
static VALUE client_border(VALUE self) {
Client* c;
Data_Get_Struct(self, Client, c);
return INT2NUM(c->border);
}
|
#border=(width) ⇒ Object
420 421 422 423 424 425 |
# File 'ext/x11_wrap.c', line 420
static VALUE client_border_set(VALUE self, VALUE width) {
Client* c;
Data_Get_Struct(self, Client, c);
border_client(c, NUM2INT(width));
return Qnil;
}
|
#border_reset ⇒ Object
427 428 429 430 431 432 |
# File 'ext/x11_wrap.c', line 427 static VALUE client_border_dset(VALUE self) { Client* c; Data_Get_Struct(self, Client, c); unborder_client(c); return Qnil; } |
#height ⇒ Object
476 477 478 479 480 |
# File 'ext/x11_wrap.c', line 476
static VALUE client_h(VALUE self) {
Client *c;
Data_Get_Struct(self, Client, c);
return INT2NUM(c->h);
}
|
#height=(nv) ⇒ Object
482 483 484 485 486 487 488 |
# File 'ext/x11_wrap.c', line 482
static VALUE client_h_set(VALUE self, VALUE nv) {
Client *c;
Data_Get_Struct(self, Client, c);
resize(c->manager, c, c->x, c->y, c->w, NUM2INT(nv), False);
return Qnil;
}
|
#name ⇒ Object
402 403 404 405 406 |
# File 'ext/x11_wrap.c', line 402
static VALUE client_name(VALUE self) {
Client *c;
Data_Get_Struct(self, Client, c);
return rb_str_new2(c->name);
}
|
#raise ⇒ Object
502 503 504 505 506 507 |
# File 'ext/x11_wrap.c', line 502 static VALUE client_raise(VALUE self) { Client *c; Data_Get_Struct(self, Client, c); raise_client(c); return client_make(cClient, c); } |
#size ⇒ Object
490 491 492 493 494 495 496 497 498 499 500 |
# File 'ext/x11_wrap.c', line 490
static VALUE client_size(VALUE self) {
Client *c;
int sizes[4];
Data_Get_Struct(self, Client, c);
sizes[0] = c->x;
sizes[1] = c->y;
sizes[2] = c->w;
sizes[3] = c->h;
return rb_ary_new3(4, INT2NUM(sizes[0]), INT2NUM(sizes[1]), INT2NUM(sizes[2]), INT2NUM(sizes[3]));
}
|
#size=(valarray) ⇒ Object
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'ext/x11_wrap.c', line 523
static VALUE client_size_set(VALUE self, VALUE valarray) {
Client *c;
Data_Get_Struct(self, Client, c);
int x,y,w,h;
if (RARRAY_LEN(valarray) >= 4) {
x = RARRAY_PTR(valarray)[0];
y = RARRAY_PTR(valarray)[1];
w = RARRAY_PTR(valarray)[2];
h = RARRAY_PTR(valarray)[3];
resize(c->manager, c, x, y, w, h, False);
}
else
rb_raise(rb_eArgError, "wrong number of arguments [x,y,w,h]");
return Qnil;
}
|
#unban ⇒ Object
516 517 518 519 520 521 |
# File 'ext/x11_wrap.c', line 516 static VALUE client_unban(VALUE self) { Client* c; Data_Get_Struct(self, Client, c); unban_client(c); return client_make(cClient, c); } |
#wid ⇒ Object
396 397 398 399 400 |
# File 'ext/x11_wrap.c', line 396
static VALUE client_wid(VALUE self) {
Client *c;
Data_Get_Struct(self, Client, c);
return INT2NUM(c->win);
}
|
#width ⇒ Object
462 463 464 465 466 |
# File 'ext/x11_wrap.c', line 462
static VALUE client_w(VALUE self) {
Client *c;
Data_Get_Struct(self, Client, c);
return INT2NUM(c->w);
}
|
#width=(nv) ⇒ Object
468 469 470 471 472 473 474 |
# File 'ext/x11_wrap.c', line 468
static VALUE client_w_set(VALUE self, VALUE nv) {
Client *c;
Data_Get_Struct(self, Client, c);
resize(c->manager, c, c->x, c->y, NUM2INT(nv), c->h, False);
return Qnil;
}
|
#window_class ⇒ Object
408 409 410 411 412 |
# File 'ext/x11_wrap.c', line 408
static VALUE client_class(VALUE self) {
Client *c;
Data_Get_Struct(self, Client, c);
return rb_str_new2(c->class);
}
|
#xpos ⇒ Object
434 435 436 437 438 |
# File 'ext/x11_wrap.c', line 434
static VALUE client_x(VALUE self) {
Client *c;
Data_Get_Struct(self, Client, c);
return INT2NUM(c->x);
}
|
#xpos=(nv) ⇒ Object
440 441 442 443 444 445 446 |
# File 'ext/x11_wrap.c', line 440
static VALUE client_x_set(VALUE self, VALUE nv) {
Client *c;
Data_Get_Struct(self, Client, c);
resize(c->manager, c, NUM2INT(nv), c->y, c->w, c->h, False);
return Qnil;
}
|
#ypos ⇒ Object
448 449 450 451 452 |
# File 'ext/x11_wrap.c', line 448
static VALUE client_y(VALUE self) {
Client *c;
Data_Get_Struct(self, Client, c);
return INT2NUM(c->y);
}
|
#ypos=(nv) ⇒ Object
454 455 456 457 458 459 460 |
# File 'ext/x11_wrap.c', line 454
static VALUE client_y_set(VALUE self, VALUE nv) {
Client *c;
Data_Get_Struct(self, Client, c);
resize(c->manager, c, c->x, NUM2INT(nv), c->w, c->h, False);
return Qnil;
}
|