Lines Matching refs:gopt

15 struct gopt {  struct
25 struct gopt gopt; argument
30 struct gopt gopt; member
36 struct gopt gopt; member
41 struct gopt gopt; member
46 struct gopt gopt; member
55 struct gopt gopt; member
60 struct gopt gopt; member
83 struct gopt *gopts[FIO_MAX_OPTS];
144 struct gopt *g = o->gui_data; in gopt_set_children_visible()
158 static void gopt_mark_index(struct gopt_job_view *gjv, struct gopt *gopt, in gopt_mark_index() argument
161 INIT_FLIST_HEAD(&gopt->changed_list); in gopt_mark_index()
164 gopt->opt_index = idx; in gopt_mark_index()
165 gopt->opt_type = type; in gopt_mark_index()
166 gopt->gjv = gjv; in gopt_mark_index()
167 gjv->gopts[idx] = gopt; in gopt_mark_index()
187 static void gopt_changed(struct gopt *gopt) in gopt_changed() argument
189 struct gopt_job_view *gjv = gopt->gjv; in gopt_changed()
198 if (flist_empty(&gopt->changed_list)) { in gopt_changed()
199 flist_add_tail(&gopt->changed_list, &gjv->changed_list); in gopt_changed()
207 struct fio_option *o = &fio_options[s->gopt.opt_index]; in gopt_str_changed()
211 gopt_changed(&s->gopt); in gopt_str_changed()
216 gopt_set_children_visible(s->gopt.gjv, o, set); in gopt_str_changed()
233 static struct gopt *gopt_new_str_store(struct gopt_job_view *gjv, in gopt_new_str_store()
242 s->gopt.box = gtk_hbox_new(FALSE, 3); in gopt_new_str_store()
249 gopt_mark_index(gjv, &s->gopt, idx, GOPT_STR); in gopt_new_str_store()
257 …s->gopt.sig_handler = g_signal_connect(G_OBJECT(s->entry), "changed", G_CALLBACK(gopt_str_changed)… in gopt_new_str_store()
260 gtk_box_pack_start(GTK_BOX(s->gopt.box), s->entry, FALSE, FALSE, 0); in gopt_new_str_store()
261 gtk_box_pack_start(GTK_BOX(s->gopt.box), label, FALSE, FALSE, 0); in gopt_new_str_store()
262 return &s->gopt; in gopt_new_str_store()
268 struct fio_option *o = &fio_options[c->gopt.opt_index]; in gopt_combo_changed()
271 gopt_changed(&c->gopt); in gopt_combo_changed()
275 gopt_set_children_visible(c->gopt.gjv, o, index); in gopt_combo_changed()
295 c->gopt.box = gtk_hbox_new(FALSE, 3); in __gopt_new_combo()
302 gopt_mark_index(gjv, &c->gopt, idx, type); in __gopt_new_combo()
305 gtk_box_pack_start(GTK_BOX(c->gopt.box), c->combo, FALSE, FALSE, 0); in __gopt_new_combo()
306 gtk_box_pack_start(GTK_BOX(c->gopt.box), label, FALSE, FALSE, 0); in __gopt_new_combo()
313 struct fio_option *o = &fio_options[c->gopt.opt_index]; in gopt_combo_str_set_val()
329 static struct gopt *gopt_new_combo_str(struct gopt_job_view *gjv, in gopt_new_combo_str()
352 …c->gopt.sig_handler = g_signal_connect(G_OBJECT(c->combo), "changed", G_CALLBACK(gopt_combo_change… in gopt_new_combo_str()
353 return &c->gopt; in gopt_new_combo_str()
358 struct fio_option *o = &fio_options[c->gopt.opt_index]; in gopt_combo_int_set_val()
374 static struct gopt *gopt_new_combo_int(struct gopt_job_view *gjv, in gopt_new_combo_int()
397 …c->gopt.sig_handler = g_signal_connect(G_OBJECT(c->combo), "changed", G_CALLBACK(gopt_combo_change… in gopt_new_combo_int()
398 return &c->gopt; in gopt_new_combo_int()
405 gopt_changed(&m->gopt); in gopt_str_multi_toggled()
420 static struct gopt *gopt_new_str_multi(struct gopt_job_view *gjv, in gopt_new_str_multi()
429 m->gopt.box = gtk_hbox_new(FALSE, 3); in gopt_new_str_multi()
430 gopt_mark_index(gjv, &m->gopt, idx, GOPT_STR_MULTI); in gopt_new_str_multi()
436 gtk_box_pack_start(GTK_BOX(m->gopt.box), frame, FALSE, FALSE, 3); in gopt_new_str_multi()
453 g_signal_connect(G_OBJECT(m->gopt.box), "destroy", G_CALLBACK(gopt_str_multi_destroy), m); in gopt_new_str_multi()
454 return &m->gopt; in gopt_new_str_multi()
460 struct fio_option *o = &fio_options[i->gopt.opt_index]; in gopt_int_changed()
464 gopt_changed(&i->gopt); in gopt_int_changed()
472 struct gopt *b_inv = o->inv_opt->gui_data; in gopt_int_changed()
473 struct gopt_int *i_inv = container_of(b_inv, struct gopt_int, gopt); in gopt_int_changed()
480 g_signal_handler_block(G_OBJECT(i_inv->spin), i_inv->gopt.sig_handler); in gopt_int_changed()
482 g_signal_handler_unblock(G_OBJECT(i_inv->spin), i_inv->gopt.sig_handler); in gopt_int_changed()
510 i->gopt.box = gtk_hbox_new(FALSE, 3); in __gopt_new_int()
535 gopt_mark_index(gjv, &i->gopt, idx, GOPT_INT); in __gopt_new_int()
541 …i->gopt.sig_handler = g_signal_connect(G_OBJECT(i->spin), "value-changed", G_CALLBACK(gopt_int_cha… in __gopt_new_int()
544 gtk_box_pack_start(GTK_BOX(i->gopt.box), i->spin, FALSE, FALSE, 0); in __gopt_new_int()
545 gtk_box_pack_start(GTK_BOX(i->gopt.box), label, FALSE, FALSE, 0); in __gopt_new_int()
550 static struct gopt *gopt_new_int(struct gopt_job_view *gjv, in gopt_new_int()
563 return &i->gopt; in gopt_new_int()
566 static struct gopt *gopt_new_ullong(struct gopt_job_view *gjv, in gopt_new_ullong()
573 return &i->gopt; in gopt_new_ullong()
579 struct fio_option *o = &fio_options[b->gopt.opt_index]; in gopt_bool_toggled()
582 gopt_changed(&b->gopt); in gopt_bool_toggled()
587 struct gopt *g_inv = o->inv_opt->gui_data; in gopt_bool_toggled()
588 struct gopt_bool *b_inv = container_of(g_inv, struct gopt_bool, gopt); in gopt_bool_toggled()
592 g_signal_handler_block(G_OBJECT(b_inv->check), b_inv->gopt.sig_handler); in gopt_bool_toggled()
594 g_signal_handler_unblock(G_OBJECT(b_inv->check), b_inv->gopt.sig_handler); in gopt_bool_toggled()
597 gopt_set_children_visible(b->gopt.gjv, o, set); in gopt_bool_toggled()
613 static struct gopt *gopt_new_bool(struct gopt_job_view *gjv, in gopt_new_bool()
622 b->gopt.box = gtk_hbox_new(FALSE, 3); in gopt_new_bool()
629 gopt_mark_index(gjv, &b->gopt, idx, GOPT_BOOL); in gopt_new_bool()
640 …b->gopt.sig_handler = g_signal_connect(G_OBJECT(b->check), "toggled", G_CALLBACK(gopt_bool_toggled… in gopt_new_bool()
643 gtk_box_pack_start(GTK_BOX(b->gopt.box), b->check, FALSE, FALSE, 0); in gopt_new_bool()
644 gtk_box_pack_start(GTK_BOX(b->gopt.box), label, FALSE, FALSE, 0); in gopt_new_bool()
645 return &b->gopt; in gopt_new_bool()
659 gopt_changed(&r->gopt); in range_value_changed()
706 static struct gopt *gopt_new_int_range(struct gopt_job_view *gjv, in gopt_new_int_range()
718 r->gopt.box = gtk_hbox_new(FALSE, 3); in gopt_new_int_range()
719 gopt_mark_index(gjv, &r->gopt, idx, GOPT_RANGE); in gopt_new_int_range()
745 gtk_box_pack_start(GTK_BOX(r->gopt.box), r->spins[i], FALSE, FALSE, 0); in gopt_new_int_range()
756 gtk_box_pack_start(GTK_BOX(r->gopt.box), label, FALSE, FALSE, 0); in gopt_new_int_range()
757 g_signal_connect(G_OBJECT(r->gopt.box), "destroy", G_CALLBACK(gopt_range_destroy), r); in gopt_new_int_range()
758 return &r->gopt; in gopt_new_int_range()
804 gopt_changed(&g->gopt); in gopt_str_val_changed()
823 static struct gopt *gopt_new_str_val(struct gopt_job_view *gjv, in gopt_new_str_val()
833 g->gopt.box = gtk_hbox_new(FALSE, 3); in gopt_new_str_val()
838 gopt_mark_index(gjv, &g->gopt, idx, GOPT_STR_VAL); in gopt_new_str_val()
844 gtk_box_pack_start(GTK_BOX(g->gopt.box), g->spin, FALSE, FALSE, 0); in gopt_new_str_val()
856 gtk_box_pack_start(GTK_BOX(g->gopt.box), g->combo, FALSE, FALSE, 0); in gopt_new_str_val()
857 gtk_box_pack_start(GTK_BOX(g->gopt.box), label, FALSE, FALSE, 3); in gopt_new_str_val()
864 g_signal_connect(G_OBJECT(g->gopt.box), "destroy", G_CALLBACK(gopt_str_val_destroy), g); in gopt_new_str_val()
865 return &g->gopt; in gopt_new_str_val()
869 struct gopt *gopt, struct thread_options *to) in gopt_set_option() argument
879 g = container_of(gopt, struct gopt_str_val, gopt); in gopt_set_option()
891 i = container_of(gopt, struct gopt_int, gopt); in gopt_set_option()
904 c = container_of(gopt, struct gopt_combo, gopt); in gopt_set_option()
914 i = container_of(gopt, struct gopt_int, gopt); in gopt_set_option()
927 b = container_of(gopt, struct gopt_bool, gopt); in gopt_set_option()
940 c = container_of(gopt, struct gopt_combo, gopt); in gopt_set_option()
953 s = container_of(gopt, struct gopt_str, gopt); in gopt_set_option()
971 s = container_of(gopt, struct gopt_str, gopt); in gopt_set_option()
976 c = container_of(gopt, struct gopt_combo, gopt); in gopt_set_option()
991 r = container_of(gopt, struct gopt_range, gopt); in gopt_set_option()
1010 struct gopt *go = NULL; in gopt_add_option()
1158 struct gopt *gopt = gjv->gopts[i]; in gopt_set_options() local
1160 gopt_set_option(gjv, o, gopt, to); in gopt_set_options()
1330 static void gopt_handle_changed(struct gopt *gopt) in gopt_handle_changed() argument
1332 struct fio_option *o = &fio_options[gopt->opt_index]; in gopt_handle_changed()
1333 struct gopt_job_view *gjv = gopt->gjv; in gopt_handle_changed()
1335 switch (gopt->opt_type) { in gopt_handle_changed()
1339 c = container_of(gopt, struct gopt_combo, gopt); in gopt_handle_changed()
1346 c = container_of(gopt, struct gopt_combo, gopt); in gopt_handle_changed()
1353 i = container_of(gopt, struct gopt_int, gopt); in gopt_handle_changed()
1360 b = container_of(gopt, struct gopt_bool, gopt); in gopt_handle_changed()
1367 s = container_of(gopt, struct gopt_str, gopt); in gopt_handle_changed()
1374 s = container_of(gopt, struct gopt_str_val, gopt); in gopt_handle_changed()
1381 r = container_of(gopt, struct gopt_range, gopt); in gopt_handle_changed()
1388 m = container_of(gopt, struct gopt_str_multi, gopt); in gopt_handle_changed()
1393 log_err("gfio: bad option type: %d\n", gopt->opt_type); in gopt_handle_changed()
1412 struct gopt *gopt; in gopt_handle_changed_options() local
1416 gopt = flist_entry(entry, struct gopt, changed_list); in gopt_handle_changed_options()
1417 gopt_handle_changed(gopt); in gopt_handle_changed_options()
1436 gopt = flist_first_entry(&gjv->changed_list, struct gopt, changed_list); in gopt_handle_changed_options()
1437 flist_del_init(&gopt->changed_list); in gopt_handle_changed_options()