コード例 #1
0
ファイル: Spliter.cpp プロジェクト: binzume/cppfl
int main(int argc, char **argv)
{
	Form myForm("cppfl サンプル", 640, 480);
	myForm.fixsize(false); // サイズ変更可能

	Spliter spl(0);
	Spliter spl2(0, false); // 横分割

	TextBox t1("あああ");
	TextBox t2("test2",0,true);
	TextBox t3("test3",0,true);
	ListView lv;
	char *cols[] = {"name","aaa2"};
	lv.addCol(cols,2);
	char *s[] = {"abc","222"};
	lv.add(s,2);
	spl.add(&t1);
	spl.add(&spl2);
	spl2.add(&t2);
	spl2.add(&lv);
	spl.size(320,240);
	spl.align(Widget::FIT);

	myForm.add(spl,0,30);


	// 検索ボックス
	TextBox w("");
	w.size(240,24);
	myForm.add(w,4,2);

	// 検索ボタン
	Button findb("find");
	myForm.add(findb,250,2);

	wait(myForm);

	return 0;
}
コード例 #2
0
ファイル: gayle_pcmcia.c プロジェクト: lacombar/netbsd-alc
static void
pccard_kthread(void *arg)
{
	struct pccard_softc *self = arg;
	struct pccard_slot *slot = &self->devs[0];

	for (;;) {
		int s = spl2();

		if (slot->flags & SLOT_NEW_CARD_EVENT) {
			slot->flags &= ~SLOT_NEW_CARD_EVENT;
			gayle.intreq = 0xc0;

			/* reset the registers */
			gayle.intreq = GAYLE_INT_IDE | GAYLE_INT_DETECT;
			gayle.pcc_status = GAYLE_CCMEM_WP | GAYLE_CCIO_SPKR;
			gayle.pcc_config = 0;
			pccard_attach_slot(&self->devs[0]);
		}
		splx(s);

		tsleep(slot, PWAIT, "pccthread", hz);
	}
}