资源简介
东软实训做的聊天程序,,,基本功能都实现啦,,,附加有涂鸦,截图,窗口抖动等功能。

代码片段和文件信息
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define HOST_NAME “127.0.0.1“
#define PORT 3333
#define BUF_SIZE 1024
#define FILE_NAME_MAX_SIZE 512
#define GIVE_ME_USER_LIST 111222
typedef struct send_message
{
int send_num;
int recv_num;
char send_name[32];
char send_msg[BUF_SIZE];
}send_m;
typedef struct user_info //用户信息结构体
{
int userId;
int status;
char userName[32];
char head_image[100];
int is_online;
int socket;
int talking;
}u_info;
u_info **userlist; //存储用户信息列表
int USERNUM;
typedef struct server_set
{
int c_sock;
int talk;
}s_s;
typedef struct quit_window
{
int talk;
GtkWidget* widget;
}q_w;
typedef struct
{
GtkWidget *talk_win;
GtkWidget *send_view *recv_view;;
int talk;
int send;
} Talk_Win; // 聊天对话框数据结构
/****登录界面用*****/
static GtkWidget* entry1;
static GtkWidget* entry2;
static GtkWidget* entry3;
static GtkWidget* entry4;
/****登录界面用*****/
static GtkWidget *FileSelection;
static GtkWidget *treeview;
static GtkWidget *entry11*entry12*entry13*entry14;
GData *talk_w = NULL;
u_info my_info;
int socket_in; //服务器socket
int login;
GtkTreeStore *store;
char bg[100] = “/home/richie/linux_c/image/bg/2.jpg“;
void win_set_pic(GtkWidget* gchar*);
void* process_recv(void*);
void recv_text(char * char* GtkWidget*);
void exit_event(GtkWidget* gpointer);
void mes_send_event(GtkWidget* gpointer);
void front_change(GtkWidget* gpointer*);
void color_change(GtkWidget* gpointer*);
void bg_change(GtkWidget* gpointer*);
void file_send(GtkWidget* gpointer*);
void face_chooce(GtkWidget* gpointer*);
void draw_area(GtkWidget* gpointer*);
void send_file(GtkWidget* gpointer*);
void recv_file();
void row_activated(GtkTreeView* GtkTreePath* GtkTreeViewColumn* gpointer);
void set_user_info(GtkWidget* gpointer);
void tree_view_init(GtkWidget*);
void add_tree_item(GtkWidget* GArray* gchar*);
void bg_get_name(GtkWidget* gpointer*);
void on_changed_tree(int);
void cut_screen(GtkWidget* gpointer*);
void cut_it(GtkWidget* gpointer*);
Talk_Win* create_send_win(int);
void creat_message_dialog (GtkMessageType type gchar* message)
{
GtkWidget* dialogx;
dialogx = gtk_message_dialog_new(NULL GTK_DIALOG_MODAL type GTK_BUTTONS_OK message);
gtk_dialog_run(GTK_DIALOG(dialogx));
gtk_widget_destroy(dialogx);
}
void on_login_clicked(GtkWidget* gpointer); //处理登录键按下的函数
void on_register_clicked(GtkWidget* gpointer); //处理注册键按下的函数
void register_it(GtkWidget* gpointer);
void destroy(GtkWidget* gpointer*);
/*****************绘图板************************/
static GdkPixmap *pixmap = NULL;
static gint cursor_proximity = TRUE;
static gdouble cursor_x;
static gdouble cursor_y;
static GdkDevice *current_device;
static void update_cursor (GtkWidget *widget gdouble x gdouble y)
{
static gint cursor_present =
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 12288 2011-07-27 15:39 linux(linpop)\linux_c\.try.c.swp
文件 48924 2011-08-03 05:10 linux(linpop)\linux_c\client
文件 44389 2011-08-03 05:10 linux(linpop)\linux_c\client.c
文件 5781 2011-08-02 13:20 linux(linpop)\linux_c\databa
文件 528 2011-08-02 13:19 linux(linpop)\linux_c\databa
文件 6724 2011-08-02 13:21 linux(linpop)\linux_c\databa
文件 24216 2011-08-02 12:19 linux(linpop)\linux_c\image\bg\1.jpg
文件 65876 2011-08-02 12:42 linux(linpop)\linux_c\image\bg\10.jpg
文件 20611 2011-08-02 12:43 linux(linpop)\linux_c\image\bg\11.jpg
文件 52006 2011-08-02 12:20 linux(linpop)\linux_c\image\bg\2.jpg
文件 56366 2011-08-02 12:23 linux(linpop)\linux_c\image\bg\3.jpg
文件 49714 2011-08-02 12:45 linux(linpop)\linux_c\image\bg\4.jpg
文件 13746 2011-08-02 12:24 linux(linpop)\linux_c\image\bg\5.jpg
文件 27470 2011-08-02 12:28 linux(linpop)\linux_c\image\bg\6.jpg
文件 25142 2011-08-02 12:34 linux(linpop)\linux_c\image\bg\7.jpg
文件 13021 2011-08-02 12:39 linux(linpop)\linux_c\image\bg\8.jpg
文件 47741 2011-08-02 12:40 linux(linpop)\linux_c\image\bg\9.jpg
文件 3833 2011-08-01 11:18 linux(linpop)\linux_c\image\head\1.jpg
文件 3208 2011-08-02 09:02 linux(linpop)\linux_c\image\head\10.jpg
文件 2947 2011-08-02 09:02 linux(linpop)\linux_c\image\head\11.jpg
文件 3153 2011-08-02 09:03 linux(linpop)\linux_c\image\head\12.jpg
文件 4008 2011-08-01 11:20 linux(linpop)\linux_c\image\head\2.jpg
文件 3414 2011-08-02 08:57 linux(linpop)\linux_c\image\head\3.jpg
文件 4436 2011-08-02 08:55 linux(linpop)\linux_c\image\head\4.jpg
文件 2974 2011-08-02 08:56 linux(linpop)\linux_c\image\head\5.jpg
文件 2922 2011-08-02 08:59 linux(linpop)\linux_c\image\head\6.jpg
文件 3746 2011-08-02 09:00 linux(linpop)\linux_c\image\head\7.jpg
文件 2946 2011-08-02 09:00 linux(linpop)\linux_c\image\head\8.jpg
文件 3240 2011-08-02 09:01 linux(linpop)\linux_c\image\head\9.jpg
文件 822 2011-08-02 10:45 linux(linpop)\linux_c\image\ico\1.ico
............此处省略61个文件信息
相关资源
- Power Electronic Converters Modeling and Contr
- CE修改器风叶人加强版
- Oracle+11gR2+RAC安装详解(HP-UX+11.31+ia6
- Oracle+GoldenGate运维完全手册
- STM32F103RC+ADC+DMA多通道采样LCD显示
- Modbus协议官方文档中、英文全
- pcbtemp电流计算软件
- I2C读写AT24C02 基于STM32F103 cube116540
- Scratch源码
- Microsoft Forms 2.0107770
- 实验三 消息中间件应用开发:Active
- WCE注入工具
- ModelGoon-4.4.1-site.zip
- AsyncTask文件控制暂停和继续,在状态
- Visio大全模具(含Cisco、IBM等常用拓扑
- 信号奇异点Lipschitz指数计算
- 基于STM32RCT6的步进电机驱动程序
- 酒店管理系统基于Qt Creator5)
- 用友NC开发API字典
- Navicat Premium 15汉化包.zip55438
- 登录注册界面.zip48872
- 条码字体barcode128
- Rational Rose Common破解文件
- res10_300x300_ssd_iter_140000.caffemodel与dep
- scratch 第1课 翻跟斗的小猫(入门)
- stm32f407上的两个can发送和接收例程
- Scrach 欢乐狙击手.sb2
- 04741计算机网络原理知识点整理.docx(
- Wolfram Mathematica 矩阵初等变换函数(
- pscad近海风电模型 Fortran语言
评论
共有 条评论