Crossfire Client, Branch  R11627
gx11.h
Go to the documentation of this file.
00001 /*
00002  * static char *rcsid_gx11_h =
00003  *   "$Id: gx11.h 6716 2007-06-27 18:57:31Z akirschbaum $";
00004  */
00005 /*
00006     Crossfire client, a client program for the crossfire program.
00007 
00008     Copyright (C) 2001 Mark Wedel & Crossfire Development Team
00009 
00010     This program is free software; you can redistribute it and/or modify
00011     it under the terms of the GNU General Public License as published by
00012     the Free Software Foundation; either version 2 of the License, or
00013     (at your option) any later version.
00014 
00015     This program is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018     GNU General Public License for more details.
00019 
00020     You should have received a copy of the GNU General Public License
00021     along with this program; if not, write to the Free Software
00022     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00023 
00024     The author can be reached via e-mail to crossfire-devel@real-time.com
00025 */
00026 
00027 #ifndef GX11_H
00028 #define GX11_H
00029 
00030 /* gtk */
00031 #include <gtk/gtk.h>
00032 #ifndef WIN32
00033 #include <gdk/gdkx.h>
00034 #else
00035 #include <gdk/gdkwin32.h>
00036 #endif
00037 #include <gdk/gdkkeysyms.h>
00038 
00039 #include "client-types.h"
00040 #include "item.h"
00041 
00042 extern int map_size, image_size, map_image_size, map_image_half_size;
00043 extern uint8 updatekeycodes, time_map_redraw,redraw_needed;
00044 extern int updatelock;
00045 
00046 /* Pixmap data.  This is abstracted in the sense that the
00047  * code here does not care what the data points to (hence the
00048  * void).  The module using this data should know whether it
00049  * is these point to png data or image data of whatever form.
00050  * The module is not required to use all these fileds -
00051  * as png data includes transperancy, it will generally not
00052  * use the mask fields and instead just put its data into the
00053  * appropiate image fields.
00054  *
00055  * As images can now be of variable size (and potentially re-sized),
00056  * the size information is stored here.
00057  */
00058 #define DEFAULT_IMAGE_SIZE      32
00059 #define MAXPIXMAPNUM 10000
00060 typedef struct {
00061     void        *icon_mask, *icon_image;
00062     uint16      icon_width, icon_height;
00063     void        *map_mask, *map_image;
00064     uint16      map_width, map_height;
00065     void        *fog_image;
00066     uint16      smooth_face;
00067 } PixmapInfo;
00068 
00069 extern PixmapInfo *pixmaps[MAXPIXMAPNUM];
00070 
00071 /* Some global widgetws */
00072 extern GtkWidget    *gtkwin_root,*drawingarea,*run_label,*fire_label;
00073 extern GtkWidget    *gtkwin_info, *gtkwin_stats, *gtkwin_message;
00074 extern GtkWidget    *gtkwin_look, *gtkwin_inv;
00075 extern GtkWidget    *entrytext, *counttext;
00076 extern GdkPixmap    *mapwindow,*dark;
00077 extern GdkBitmap    *dark1, *dark2, *dark3;
00078 extern GdkGC        *mapgc;
00079 extern GtkWidget    *ckentrytext, *ckeyentrytext, *cmodentrytext,*cnumentrytext, *cclist;
00080 extern GtkTooltips  *tooltips;
00081 
00082 /*
00083  *  This is similar obwin, but totally redone for client
00084  */
00085 typedef struct {
00086   item *env;              /* Environment shown in window */
00087   char title[MAX_BUF];  /* title of item list */
00088   char last_title[MAX_BUF];
00089   char last_weight[MAX_BUF];
00090   char last_maxweight[MAX_BUF];
00091 
00092   GtkWidget *label; /* e.g. "Inventory:", "keyring:" */
00093   GtkWidget *weightlabel;
00094   GtkWidget *maxweightlabel;
00095 
00096   uint8 show_icon:1;      /* show status icons */
00097   uint8 show_weight:1;  /* show item's weight */
00098 
00099   uint32 weight_limit;   /* Weight limit for this list - used for title */
00100 } itemlist;
00101 
00102 extern itemlist inv_list, look_list;
00103 
00104 typedef struct news_entry{
00105     char* title;
00106     char* content;
00107     struct news_entry* next;
00108 } news_entry;
00109 
00110 typedef struct media_state{
00111     GdkColor fore;
00112     GdkFont **style;
00113     int has_color:1;
00114     int flavor;
00115 } media_state;
00116 #endif