gui.c

来自「AirFart监听 802.11流量」· C语言 代码 · 共 60 行

C
60
字号
/*   This file is part of AirFart.   AirFart is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2 of the License, or   (at your option) any later version.   AirFart is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.   You should have received a copy of the GNU General Public License   along with AirFart; if not, write to the Free Software   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/#include "gui.h"void* main_gui (void* ptr){	gtk_main ();	return NULL;}int start_gui(){	GtkWidget *main_window;	gtk_set_locale ();	//add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");	main_window = create_main_window ();	gtk_widget_show (main_window);//	pthread_t threadId;//	pthread_create(&threadId,NULL,main_gui,NULL);	gdk_threads_enter();	gtk_main();	gdk_threads_leave();	return 1;}int test_gui(){	unsigned char eth_addr_in[6] =  { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc };	unsigned char eth_addr_in2[6] = { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbd };	unsigned char eth_addr_in3[6] = { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbe };	unsigned char eth_addr_in4[6] = { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbf };	unsigned char eth_addr_in5[6] = { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xad };		update_treeview(eth_addr_in,  "myap", "b", rand() % 100  + 1, 1);	update_treeview(eth_addr_in2, "myap", "d", rand() % 100 + 1, 1);	update_treeview(eth_addr_in3, "myap", "d", rand() % 100 + 1, 1);	update_treeview(eth_addr_in4, "myap", "d", rand() % 100 + 1, 1);	update_treeview(eth_addr_in5, "myap", "d", rand() % 100 + 1, 1);	return 1;}

⌨️ 快捷键说明

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