Method: ActiveWindowX::Xlib.x_open_display
- Defined in:
- ext/active_window_x/xlib.c
.x_open_display(name_obj) ⇒ Object
XOpenDisplay
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'ext/active_window_x/xlib.c', line 49 VALUE xlib_x_open_display(VALUE self, VALUE name_obj) { const char* name; Display* d; if (TYPE(name_obj) == T_NIL){ name = NULL; }else{ name = (const char*) StringValuePtr(name_obj); } d = XOpenDisplay(name); if (d == NULL) { rb_raise(unknown_display_name_class, "invalid name: %s", name); return Qnil; } return Data_Wrap_Struct(display_class, 0, 0, d); } |