static VALUE rg_m_send_notify(int argc, VALUE *argv, VALUE self) { VALUE requestor, selection, target, property, time; if (argc == 5) { rb_scan_args(argc, argv, "50", &requestor, &selection, &target, &property, &time); gdk_selection_send_notify(RVAL2GDKNATIVEWINDOW(requestor), RVAL2ATOM(selection), RVAL2ATOM(target), NIL_P(property) ? GDK_NONE : RVAL2ATOM(property), NUM2INT(time)); } else { #if GTK_CHECK_VERSION(2,2,0) VALUE display = Qnil; rb_scan_args(argc, argv, "60", &display, &requestor, &selection, &target, &property, &time); gdk_selection_send_notify_for_display(GDK_DISPLAY_OBJECT(RVAL2GOBJ(display)), RVAL2GDKNATIVEWINDOW(requestor), RVAL2ATOM(selection), RVAL2ATOM(target), NIL_P(property) ? GDK_NONE : RVAL2ATOM(property), NUM2INT(time)); #else rb_raise(rb_eArgError, "Wrong number of arguments: %d", argc); #endif } return self; }
/** * gdk_selection_send_notify: * @requestor: window to which to deliver response. * @selection: selection that was requested. * @target: target that was selected. * @property: property in which the selection owner stored the * data, or %GDK_NONE to indicate that the request * was rejected. * @time_: timestamp. * * Sends a response to SelectionRequest event. */ void gdk_selection_send_notify (GdkWindow *requestor, GdkAtom selection, GdkAtom target, GdkAtom property, guint32 time) { gdk_selection_send_notify_for_display (gdk_window_get_display (requestor), requestor, selection, target, property, time); }
static VALUE rg_m_send_notify(int argc, VALUE *argv, VALUE self) { VALUE requestor, selection, target, property, time; if (argc == 5) { rb_scan_args(argc, argv, "50", &requestor, &selection, &target, &property, &time); gdk_selection_send_notify(RVAL2GDKNATIVEWINDOW(requestor), RVAL2ATOM(selection), RVAL2ATOM(target), NIL_P(property) ? GDK_NONE : RVAL2ATOM(property), NUM2INT(time)); } else { VALUE display = Qnil; rb_scan_args(argc, argv, "60", &display, &requestor, &selection, &target, &property, &time); gdk_selection_send_notify_for_display(GDK_DISPLAY_OBJECT(RVAL2GOBJ(display)), RVAL2GDKNATIVEWINDOW(requestor), RVAL2ATOM(selection), RVAL2ATOM(target), NIL_P(property) ? GDK_NONE : RVAL2ATOM(property), NUM2INT(time)); } return self; }