コード例 #1
0
ファイル: view.c プロジェクト: shaojianqing/SmileOS
View *createView(int x, int y, int width, int height)
{
	View *view = (View *)alloc(sizeof(View));	
	view = initWithViewFunction(view, x, y, width, height);
	(*view).clearView(view);
	return view;
}
コード例 #2
0
ファイル: gridPanel.c プロジェクト: shaojianqing/SmileOS
GridPanel *createGridPanel(int x, int y, int w, int h)
{
	GridPanel *gridPanel = (GridPanel *)alloc(sizeof(GridPanel));
	gridPanel = (GridPanel*)initWithViewFunction((View*)gridPanel, x, y, w, h);
	(*gridPanel).initPanel = initGridPanel;
	(*gridPanel).renderDataGrid = renderDataGrid;
	(*gridPanel).view.onMouseDown = onMouseDown;
	
	return gridPanel;
}
コード例 #3
0
ファイル: startButton.c プロジェクト: 1514louluo/SmileOS
StartButton *createStartButton(int x, int y, int w, int h, u32 sector)
{
	StartButton *startButton = (StartButton *)allocMemory(sizeof(StartButton));
	startButton = (StartButton*)initWithViewFunction((View*)startButton, x, y, w, h);
	(*startButton).initWithImage = initWithImage;
	Image *image = loadImageFromStorage(sector);
	(*startButton).initWithImage(startButton, image);
	
	return startButton;
}
コード例 #4
0
ファイル: graphPanel.c プロジェクト: 1514louluo/SmileOS
GraphPanel *createGraphPanel(int x, int y, int w, int h)
{
	GraphPanel *graphPanel = (GraphPanel *)allocMemory(sizeof(GraphPanel));
	graphPanel = (GraphPanel*)initWithViewFunction((View*)graphPanel, x, y, w, h);
	(*graphPanel).canvas = createView(x, y, w, h);	
	(*graphPanel).initPanel = initGraphPanel;
	(*graphPanel).initPanel(graphPanel);
	(*graphPanel).view.onMouseDown = onMouseDown;
	
	return graphPanel;
}
コード例 #5
0
ファイル: coorPanel.c プロジェクト: wmwwmv/SmileOS
CoorPanel *createCoorPanel(int x, int y, int w, int h)
{
	CoorPanel *coorPanel = (CoorPanel *)allocPage(sizeof(CoorPanel));
	coorPanel = (CoorPanel *)initWithViewFunction((View*)coorPanel, x, y, w, h);
	(*coorPanel).canvas = createView(x, y, w, h);	
	(*coorPanel).initPanel = initCoorPanel;
	(*coorPanel).initPanel(coorPanel);	
	(*coorPanel).view.onMouseDown = onMouseDown;
	
	return coorPanel;
}