📄 gui.c
字号:
/* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -