def done_cb(self, pobj, data): if xfl.fl_show_question("Do you want to quit ?", 0): print("will quit after 5 seconds\n") xfl.fl_msleep(5000) xfl.fl_hide_form(pobj.contents.form) xfl.fl_free_form(pobj.contents.form) xfl.fl_finish() sys.exit(0) else: return 0
def input_callback(self, pobj, data): buf = "Input%ld returned" % data xfl.fl_set_object_label(self.ui.status, buf) xfl.fl_XFlush() xfl.fl_msleep(50)
def peek_event(self, form, xev): if xev.contents.type == xfl.KeyPress: xfl.fl_set_object_label(self.ui.status, "keyboard input") xfl.fl_XFlush() # necessary to show the label xfl.fl_msleep(50) return 0