Crossfire Client, Branches  R11627
gx11.h
Go to the documentation of this file.
1 /*
2  * static char *rcsid_gx11_h =
3  * "$Id: gx11.h 6716 2007-06-27 18:57:31Z akirschbaum $";
4  */
5 /*
6  Crossfire client, a client program for the crossfire program.
7 
8  Copyright (C) 2001 Mark Wedel & Crossfire Development Team
9 
10  This program is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 2 of the License, or
13  (at your option) any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 
24  The author can be reached via e-mail to crossfire-devel@real-time.com
25 */
26 
27 #ifndef GX11_H
28 #define GX11_H
29 
30 /* gtk */
31 #include <gtk/gtk.h>
32 #ifndef WIN32
33 #include <gdk/gdkx.h>
34 #else
35 #include <gdk/gdkwin32.h>
36 #endif
37 #include <gdk/gdkkeysyms.h>
38 
39 #include "client-types.h"
40 #include "item.h"
41 
44 extern int updatelock;
45 
46 /* Pixmap data. This is abstracted in the sense that the
47  * code here does not care what the data points to (hence the
48  * void). The module using this data should know whether it
49  * is these point to png data or image data of whatever form.
50  * The module is not required to use all these fileds -
51  * as png data includes transperancy, it will generally not
52  * use the mask fields and instead just put its data into the
53  * appropiate image fields.
54  *
55  * As images can now be of variable size (and potentially re-sized),
56  * the size information is stored here.
57  */
58 #define DEFAULT_IMAGE_SIZE 32
59 #define MAXPIXMAPNUM 10000
60 typedef struct {
61  void *icon_mask, *icon_image;
62  uint16 icon_width, icon_height;
63  void *map_mask, *map_image;
64  uint16 map_width, map_height;
65  void *fog_image;
67 } PixmapInfo;
68 
70 
71 /* Some global widgetws */
72 extern GtkWidget *gtkwin_root,*drawingarea,*run_label,*fire_label;
73 extern GtkWidget *gtkwin_info, *gtkwin_stats, *gtkwin_message;
74 extern GtkWidget *gtkwin_look, *gtkwin_inv;
75 extern GtkWidget *entrytext, *counttext;
76 extern GdkPixmap *mapwindow,*dark;
77 extern GdkBitmap *dark1, *dark2, *dark3;
78 extern GdkGC *mapgc;
80 extern GtkTooltips *tooltips;
81 
82 /*
83  * This is similar obwin, but totally redone for client
84  */
85 typedef struct {
86  item *env; /* Environment shown in window */
87  char title[MAX_BUF]; /* title of item list */
88  char last_title[MAX_BUF];
89  char last_weight[MAX_BUF];
90  char last_maxweight[MAX_BUF];
91 
92  GtkWidget *label; /* e.g. "Inventory:", "keyring:" */
93  GtkWidget *weightlabel;
94  GtkWidget *maxweightlabel;
95 
96  uint8 show_icon:1; /* show status icons */
97  uint8 show_weight:1; /* show item's weight */
98 
99  uint32 weight_limit; /* Weight limit for this list - used for title */
100 } itemlist;
101 
102 extern itemlist inv_list, look_list;
103 
104 typedef struct news_entry{
105  char* title;
106  char* content;
107  struct news_entry* next;
108 } news_entry;
109 
110 typedef struct media_state{
111  GdkColor fore;
112  GdkFont **style;
113  int has_color:1;
114  int flavor;
115 } media_state;
116 #endif
int map_image_half_size
Definition: gx11.c:117
GtkWidget * ckeyentrytext
Definition: gx11.c:235
GtkWidget * label
Definition: gx11.h:92
struct news_entry * next
Definition: gx11.h:107
GdkFont ** style
Definition: gx11.h:112
GtkWidget * gtkwin_root
Definition: gx11.c:278
uint8 time_map_redraw
Definition: gx11.c:203
int image_size
Definition: gx11.c:116
GdkBitmap * dark1
Definition: gx11.c:249
GtkWidget * drawingarea
Definition: gx11.c:256
GtkWidget * gtkwin_info
Definition: gx11.c:278
void * fog_image
Definition: gx11.h:65
GdkBitmap * dark2
Definition: gx11.c:249
int flavor
Definition: gx11.h:114
GtkWidget * cmodentrytext
Definition: gx11.c:235
Definition: gx11.h:104
uint16 icon_width
Definition: gx11.h:62
GtkWidget * cnumentrytext
Definition: gx11.c:235
GtkWidget * fire_label
Definition: gx11.c:228
GtkWidget * gtkwin_look
Definition: gx11.c:281
GdkColor fore
Definition: gx11.h:111
char * content
Definition: gx11.h:106
GdkGC * mapgc
Definition: gx11.c:258
GtkWidget * gtkwin_inv
Definition: gx11.c:281
itemlist look_list
Definition: inventory.c:1013
char * title
Definition: gx11.h:105
GtkWidget * gtkwin_message
Definition: gx11.c:281
GdkPixmap * dark
Definition: gx11.c:250
#define MAXPIXMAPNUM
Definition: gx11.h:59
void * map_mask
Definition: gx11.h:63
GtkWidget * gtkwin_stats
Definition: gx11.c:281
item * env
Definition: gx11.h:86
struct media_state media_state
PixmapInfo * pixmaps[MAXPIXMAPNUM]
Definition: gx11.c:118
GtkWidget * maxweightlabel
Definition: gx11.h:94
unsigned short uint16
Definition: client-types.h:79
int has_color
Definition: gx11.h:113
uint32 weight_limit
Definition: gx11.h:99
int map_image_size
Definition: gx11.c:117
#define MAX_BUF
Definition: client-types.h:128
GtkTooltips * tooltips
Definition: gx11.c:252
struct news_entry news_entry
unsigned int uint32
Definition: client-types.h:77
GdkPixmap * mapwindow
Definition: gx11.c:248
int map_size
GtkWidget * weightlabel
Definition: gx11.h:93
itemlist inv_list
Definition: inventory.c:1013
GtkWidget * entrytext
Definition: gx11.c:270
GtkWidget * ckentrytext
Definition: gx11.c:235
uint16 smooth_face
Definition: gx11.h:66
GtkWidget * cclist
Definition: gx11.c:260
uint8 redraw_needed
Definition: gx11.c:205
unsigned char uint8
Definition: client-types.h:81
int updatelock
Definition: gx11.c:310
GdkBitmap * dark3
Definition: gx11.c:249
Definition: gx11.h:85
struct PixmapInfo PixmapInfo
uint8 updatekeycodes
Definition: gx11.c:204
uint16 map_width
Definition: gx11.h:64
GtkWidget * counttext
Definition: inventory.c:1072
void * icon_mask
Definition: gx11.h:61
GtkWidget * run_label
Definition: gx11.c:228