Ejemplo n.º 1
0
int main()
{
  init();
  show_main_window();
  app_event_loop();
  destroy_list(AccelLogging);
}
Ejemplo n.º 2
0
static void init(void) {
  app_message_init();

  bitmaps_init();

  create_main_window();
  show_main_window(true);
}
Ejemplo n.º 3
0
/*
 * 1. 显示界面
 * 2. 获得输入
 * 3. 处理输入
 */
void sys_main()
{
	KEY_T key;

	init_system();
	Goods_init();

	while (1) 
	{
		show_main_window();
		key = getkey();
		doit(key);
	}
}
int main(int argc,char const *argv[]){
    int sockfd;
    struct client_data client;
    struct server_data server;
    struct sockaddr_in serveraddr;
    char city[30];
	char buff[10];
    //memset(&city,0,sizeof(city));
    memset(&serveraddr,0,sizeof(serveraddr));
    serveraddr.sin_port=htons(6666);
    serveraddr.sin_family=AF_INET;
    serveraddr.sin_addr.s_addr=inet_addr("114.212.191.33");
    
    if((sockfd=socket(AF_INET,SOCK_STREAM,0))<0){
        printf("Socket Create Error!!!\n");
        return 0;
    }//创建socket
    
    if(connect(sockfd,(struct sockaddr*)&serveraddr,sizeof(serveraddr))==-1){
        printf("Server connect Error!!!\n");
        return 0;
    }//链接服务器
    system("clear");
    while(1){
        memset(&city,0,sizeof(city));
        //system("clear");
        show_main_window();
		//printf("scanf\n");
		scanf("%30s%*[^\n]",city);
		//printf("city:%s",city);
		//fflush(stdin);
        if(city[0]=='c'&&city[1]=='\0'){
            system("clear");
			memset(&city,0,sizeof(city));
		}
        else if(city[0]=='#'&&city[1]=='\0'){
            system("exit");
            return 1;
        }    
        else{
            //printf("function\n");
            if(function_choice(sockfd,client,server,city)==1)
                return 1;//功能显示
        }
    }
    return 1;
}
Ejemplo n.º 5
0
int
main (int argc, char **argv)
{
  XzibitContext context;
  GtkWidget *window;

  gtk_init (&argc, &argv);

  context.window = 0;

  window = show_main_window (chosen_window,
			     &context);

  g_signal_connect (window,
		    "delete-event",
		    G_CALLBACK (gtk_main_quit),
		    NULL);

  gtk_main ();
}
Ejemplo n.º 6
0
int main() {
  show_main_window();
  app_event_loop();
  return 0;
}
Ejemplo n.º 7
0
static void status_icon_activate_cb(GtkStatusIcon *status_icon,
                                    gpointer user_data)
{
    show_main_window(NULL);
}
Ejemplo n.º 8
0
void handle_init(void) {
  show_main_window();
}