page_rc.c~

来自「在linux下」· C~ 代码 · 共 42 行

C~
42
字号
#include<gtk/gtk.h>#include"readinfo.c"#include"createtb.c"#define PAGE_TOTAL 2typedef struct _PagePropertity{	/* the propertities of this page */	char *tabname;	/* the text of label(.i.e,tab) crspding to page */	int pos;		/* the pos. of this page */	GtkWidget *vbox;	/* the content of this page */}PagePropertity;typedef struct _PageForNoteBk{		PagePropertity pagepty;	void (* make_page)(PagePropertity *);}PageForNoteBk;void make_page1(PagePropertity *pgpty){}void make_page2(PagePropertity *pgpty){	GtkWidget *frame;	GtkWidget *table;		pgpty->vbox=gtk_vbox_new(FALSE,0);		frame=gtk_frame_new("CPU Information");	gtk_container_set_border_width(GTK_CONTAINER(frame),10);	gtk_box_pack_start(GTK_BOX(pgpty->vbox),frame,TRUE,TRUE,0);	gtk_widget_show(frame);		/* create a table, which contains the cpuinfo. Then pack it into the frame */	table=create_and_fill_table();	gtk_container_add(GTK_CONTAINER(frame),table);	gtk_widget_show(table);	gtk_widget_show(pgpty->vbox);}static PageForNoteBk page[PAGE_TOTAL]={	{{"process",0,NULL},make_page1},	{{"resource",1,NULL},make_page2}};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?