Class: XCB::MotionNotifyEvent

Inherits:
GenericEvent show all
Defined in:
ext/xproto.c

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(r_detail, r_time, r_root, r_event, r_child, r_root_x, r_root_y, r_event_x, r_event_y, r_state, r_same_screen) ⇒ Object



2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
# File 'ext/xproto.c', line 2322

static VALUE
r_XCB_MotionNotifyEvent_new(VALUE r_klass, VALUE r_detail, VALUE r_time, VALUE r_root, VALUE r_event, VALUE r_child, VALUE r_root_x, VALUE r_root_y, VALUE r_event_x, VALUE r_event_y, VALUE r_state, VALUE r_same_screen)
{
  xcb_motion_notify_event_t *self = malloc(sizeof(xcb_motion_notify_event_t));
  if (self == NULL)
    rb_raise(rb_eNoMemError, "NoMemoryError");
  VALUE r_self = Data_Wrap_Struct(r_klass, NULL, NULL, self);
  self->response_type = XCB_MOTION_NOTIFY;
  self->sequence = 0;
  self->detail = FIX2INT(r_detail);
  self->time = FIX2INT(r_time);
  self->root = FIX2INT(r_root);
  self->event = FIX2INT(r_event);
  self->child = FIX2INT(r_child);
  self->root_x = FIX2INT(r_root_x);
  self->root_y = FIX2INT(r_root_y);
  self->event_x = FIX2INT(r_event_x);
  self->event_y = FIX2INT(r_event_y);
  self->state = FIX2INT(r_state);
  self->same_screen = RTEST(r_same_screen);
  return r_self;
}

Instance Method Details

#childObject



1084
1085
1086
1087
1088
1089
1090
# File 'ext/xproto.c', line 1084

static VALUE
r_XCB_MotionNotifyEvent_get_child(VALUE r_self)
{
  xcb_motion_notify_event_t *event;
  Data_Get_Struct(r_self, xcb_motion_notify_event_t, event);
  return INT2FIX(event->child);
}

#detailObject



1056
1057
1058
1059
1060
1061
1062
# File 'ext/xproto.c', line 1056

static VALUE
r_XCB_MotionNotifyEvent_get_detail(VALUE r_self)
{
  xcb_motion_notify_event_t *event;
  Data_Get_Struct(r_self, xcb_motion_notify_event_t, event);
  return INT2FIX(event->detail);
}

#eventObject



1077
1078
1079
1080
1081
1082
1083
# File 'ext/xproto.c', line 1077

static VALUE
r_XCB_MotionNotifyEvent_get_event(VALUE r_self)
{
  xcb_motion_notify_event_t *event;
  Data_Get_Struct(r_self, xcb_motion_notify_event_t, event);
  return INT2FIX(event->event);
}

#event_xObject



1105
1106
1107
1108
1109
1110
1111
# File 'ext/xproto.c', line 1105

static VALUE
r_XCB_MotionNotifyEvent_get_event_x(VALUE r_self)
{
  xcb_motion_notify_event_t *event;
  Data_Get_Struct(r_self, xcb_motion_notify_event_t, event);
  return INT2FIX(event->event_x);
}

#event_yObject



1112
1113
1114
1115
1116
1117
1118
# File 'ext/xproto.c', line 1112

static VALUE
r_XCB_MotionNotifyEvent_get_event_y(VALUE r_self)
{
  xcb_motion_notify_event_t *event;
  Data_Get_Struct(r_self, xcb_motion_notify_event_t, event);
  return INT2FIX(event->event_y);
}

#rootObject



1070
1071
1072
1073
1074
1075
1076
# File 'ext/xproto.c', line 1070

static VALUE
r_XCB_MotionNotifyEvent_get_root(VALUE r_self)
{
  xcb_motion_notify_event_t *event;
  Data_Get_Struct(r_self, xcb_motion_notify_event_t, event);
  return INT2FIX(event->root);
}

#root_xObject



1091
1092
1093
1094
1095
1096
1097
# File 'ext/xproto.c', line 1091

static VALUE
r_XCB_MotionNotifyEvent_get_root_x(VALUE r_self)
{
  xcb_motion_notify_event_t *event;
  Data_Get_Struct(r_self, xcb_motion_notify_event_t, event);
  return INT2FIX(event->root_x);
}

#root_yObject



1098
1099
1100
1101
1102
1103
1104
# File 'ext/xproto.c', line 1098

static VALUE
r_XCB_MotionNotifyEvent_get_root_y(VALUE r_self)
{
  xcb_motion_notify_event_t *event;
  Data_Get_Struct(r_self, xcb_motion_notify_event_t, event);
  return INT2FIX(event->root_y);
}

#same_screenObject



1126
1127
1128
1129
1130
1131
1132
# File 'ext/xproto.c', line 1126

static VALUE
r_XCB_MotionNotifyEvent_get_same_screen(VALUE r_self)
{
  xcb_motion_notify_event_t *event;
  Data_Get_Struct(r_self, xcb_motion_notify_event_t, event);
  return event->same_screen ? Qtrue : Qfalse;
}

#stateObject



1119
1120
1121
1122
1123
1124
1125
# File 'ext/xproto.c', line 1119

static VALUE
r_XCB_MotionNotifyEvent_get_state(VALUE r_self)
{
  xcb_motion_notify_event_t *event;
  Data_Get_Struct(r_self, xcb_motion_notify_event_t, event);
  return INT2FIX(event->state);
}

#timeObject



1063
1064
1065
1066
1067
1068
1069
# File 'ext/xproto.c', line 1063

static VALUE
r_XCB_MotionNotifyEvent_get_time(VALUE r_self)
{
  xcb_motion_notify_event_t *event;
  Data_Get_Struct(r_self, xcb_motion_notify_event_t, event);
  return INT2FIX(event->time);
}

#visit(r_visitor) ⇒ Object



2344
2345
2346
2347
2348
# File 'ext/xproto.c', line 2344

static VALUE
r_XCB_MotionNotifyEvent_visit(VALUE r_self, VALUE r_visitor)
{
  return rb_funcall(r_visitor, rb_intern("visit_motion_notify"), 1, r_self);
}