1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
|
/* $Id: cliente.h,v 1.6 2005/06/24 05:16:00 jlanawalt Exp $ */
/*
* Batalla Naval (c) 1995,2000 Ricardo Quesada
* (riq@ciudad.com.ar)
*
* Funciones del Batalla Naval.
*
*/
#ifndef __BN_CLIENTE__
# define __BN_CLIENTE__
# define LARGO 20
# define ANCHO 20
# include <gtk/gtk.h>
# include <sys/types.h>
# include <sys/socket.h>
# include <netinet/in.h>
# include <unistd.h>
# include "protocol.h"
/*
* Estructuras y Funciones Principales
*/
struct usuario {
char server[MAXSERVERNAME]; /* server name */
int port; /* server port */
int random; /* Random Number 0.59.38 */
char nombre[MAXNAMELEN]; /* user name */
char names[MAXPLAYER][MAXNAMELEN];/* other players's name */
int play; /* already playing ? */
int numjug; /* number of player */
int usrfrom; /* player who is owner of enemy window */
char tomsg[PROT_MAX_LEN]; /* usuadas para mandar mensajes */
int hide; /* flag de hide my board */
int tag; /* propio de GDK_INPUT_ADD */
char tempclit[10*10]; /* Variable usada por el cliente */
int pages[MAXPLAYER]; /* Variable de las paginas . only GTK ? */
/* int autorobot; */ /* Autolanzamiento del robot */
int debug_level; /* Debug level usado por ttyfill */
int sock; /* Socket del cliente al server */
char mitabla[10][10]; /* mi tabla de barcos */
char barquitos[4]; /* tamaos de los barcos 1 de 4, 2 de 3, etc. */
int with_ggz; /* enable ggz mode */
int view_grid; /* show/hide the map grid */
};
extern struct usuario usuario;
extern GSettings *settings;
/* Variables - GTK */
/* contenedores */
extern GtkWidget *window;
extern GtkWidget *hbox;
extern GtkWidget *vbox;
/* left */
extern GtkWidget *notebook_left;
extern GtkWidget *label_left;
extern GtkWidget *drawing_left;
extern GtkWidget *hbox_text_help;
extern GtkWidget *text_help;
extern GtkWidget *vscrollbar_help;
/* right */
extern GtkWidget *notebook_right;
extern GtkWidget *label_right_about;
extern GtkWidget *drawing_right_about;
extern GtkWidget *label_right[MAXPLAYER];
extern GtkWidget *label_right2[MAXPLAYER];
extern GtkWidget *drawing_right[MAXPLAYER];
/* otros */
extern GtkWidget *hbox_text;
extern GtkWidget *vscrollbar;
extern GtkWidget *separator;
extern GtkWidget *text;
/* Pixmaps */
extern GdkPixbuf *barco1 ;
extern GdkPixbuf *barco1_t ;
extern GdkPixbuf *barco1_h ;
extern GdkPixbuf *barco2h ;
extern GdkPixbuf *barco2h_t ;
extern GdkPixbuf *barco2h_h ;
extern GdkPixbuf *barco2v ;
extern GdkPixbuf *barco2v_t ;
extern GdkPixbuf *barco2v_h ;
extern GdkPixbuf *barco3h ;
extern GdkPixbuf *barco3h_t ;
extern GdkPixbuf *barco3h_h ;
extern GdkPixbuf *barco3v ;
extern GdkPixbuf *barco3v_t ;
extern GdkPixbuf *barco3v_h ;
extern GdkPixbuf *barco4h ;
extern GdkPixbuf *barco4h_t ;
extern GdkPixbuf *barco4h_h ;
extern GdkPixbuf *barco4v ;
extern GdkPixbuf *barco4v_t ;
extern GdkPixbuf *barco4v_h ;
extern GdkPixbuf *fondo ;
extern GdkPixbuf *agua ;
extern GdkPixbuf *about_pix ;
extern GdkPixbuf *icono ;
extern GtkWidget *hbox_status;
extern GtkWidget *statusbar_left;
extern GtkWidget *statusbar_right;
/* Usadas por Configure */
extern GtkWidget *conf_spinner_port;
extern GtkWidget *conf_entry_server;
extern GtkWidget *conf_entry_name;
extern GtkWidget *conf_check_button;
extern GtkWidget *conf_cb_ttyfill;
/* Usadas por Sendmsg */
extern GtkWidget *send_spinner_towho;
extern GtkWidget *send_entry_message;
extern GtkWidget *send_toggle_button;
#endif /*__BN_CLIENTE__*/
|