예제 #1
0
static void __init msm7627a_calculate_reserve_sizes(void)
{
	fix_sizes();
	size_ion_devices();
	reserve_ion_memory();
	reserve_rtb_memory();
}
예제 #2
0
void MessageBox::run_plain(bool center) {
	fix_sizes();

	if(center) {
		int X, Y, W, H;
		Fl::screen_xywh(X, Y, W, H);
		position(W/2 - w()/2, H/2 - h()/2);
	}

	if(!shown())
		show();

	while(shown())
		Fl::wait();
}
예제 #3
0
int MessageBox::run(bool center) {
	if(!nbuttons) {
		run_plain();
		return -1;
	}
		
	fix_sizes();

	if(center) {
		int X, Y, W, H;
		Fl::screen_xywh(X, Y, W, H);
		position(W/2 - w()/2, H/2 - h()/2);
	}

	show();

	Fl_Widget* widget;
	int ret = -1;
	while(1) {
		widget = Fl::readqueue();
		if(!widget) {
			Fl::wait();
		} else if(widget == this) {
			ret = -1;
			goto dialog_end;
		} else {
			for(int n = 0; n < nbuttons; n++) {
				if(buttons[n] == widget) {
					ret = n;
					goto dialog_end;
				}
			}
		}
	}

dialog_end:
	hide();
	return ret;
}