Crossfire Client, Branch  R11627
Data Structures | Defines | Typedefs | Functions | Variables
image.c File Reference
#include <config.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
#include <png.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <gdk/gdkkeysyms.h>
#include "client-types.h"
#include "gx11.h"
#include "client.h"
#include "gtkproto.h"
Include dependency graph for image.c:

Go to the source code of this file.

Data Structures

struct  Keys

Defines

#define BPP   4
#define MAX_ICON_SPACES   10
#define ROTATE_RIGHT(c)   if ((c) & 01) (c) = ((c) >>1) + 0x80000000; else (c) >>= 1;

Typedefs

typedef struct Keys Key_Entry

Functions

void addsmooth (uint16 face, uint16 smooth_face)
int associate_cache_entry (Cache_Entry *ce, int pixnum)
int create_and_rescale_image_from_data (Cache_Entry *ce, int pixmap_num, uint8 *rgba_data, int width, int height)
static void create_icon_image (uint8 *data, PixmapInfo *pi, int pixmap_num)
static void create_map_image (uint8 *data, PixmapInfo *pi)
static void free_pixmap (PixmapInfo *pi)
void get_map_image_size (int face, uint8 *w, uint8 *h)
void image_update_download_status (int start, int end, int total)
void reset_image_data (void)

Variables

static int icon_rescale_factor [MAX_ICON_SPACES]
int last_face_num = 0
static GtkAdjustment * padj = NULL
static GtkWidget * pbar = NULL
static GtkWidget * pbar_window = NULL
struct {
   uint32   checksum
   uint32   height
   char *   name
   uint8 *   png_data
   uint32   width
private_cache [MAXPIXMAPNUM]
const char *const rcsid_gtk_image_c = "$Id: image.c 9201 2008-06-01 17:32:45Z anmaster $"

Define Documentation

#define BPP   4

Definition at line 67 of file image.c.

Referenced by create_and_rescale_image_from_data().

#define MAX_ICON_SPACES   10

Definition at line 86 of file image.c.

Referenced by create_and_rescale_image_from_data().

#define ROTATE_RIGHT (   c)    if ((c) & 01) (c) = ((c) >>1) + 0x80000000; else (c) >>= 1;

Definition at line 109 of file image.c.


Typedef Documentation

typedef struct Keys Key_Entry

Function Documentation

void addsmooth ( uint16  face,
uint16  smooth_face 
)

Definition at line 360 of file image.c.

int associate_cache_entry ( Cache_Entry ce,
int  pixnum 
)

Definition at line 372 of file image.c.

int create_and_rescale_image_from_data ( Cache_Entry ce,
int  pixmap_num,
uint8 rgba_data,
int  width,
int  height 
)

Definition at line 252 of file image.c.

static void create_icon_image ( uint8 data,
PixmapInfo pi,
int  pixmap_num 
) [static]

Definition at line 114 of file image.c.

References gtkwin_root, PixmapInfo::icon_height, PixmapInfo::icon_image, PixmapInfo::icon_mask, PixmapInfo::icon_width, LOG(), LOG_ERROR, and rgba_to_gdkpixmap().

Referenced by create_and_rescale_image_from_data().

Here is the call graph for this function:

Here is the caller graph for this function:

static void create_map_image ( uint8 data,
PixmapInfo pi 
) [static]

Definition at line 123 of file image.c.

References CFG_DM_SDL, CONFIG_DISPLAYMODE, PixmapInfo::fog_image, gtkwin_root, PixmapInfo::map_height, PixmapInfo::map_image, PixmapInfo::map_mask, PixmapInfo::map_width, rgba_to_gdkpixmap(), and use_config.

Referenced by create_and_rescale_image_from_data().

Here is the call graph for this function:

Here is the caller graph for this function:

static void free_pixmap ( PixmapInfo pi) [static]
void get_map_image_size ( int  face,
uint8 w,
uint8 h 
)

Definition at line 459 of file image.c.

void image_update_download_status ( int  start,
int  end,
int  total 
)

Definition at line 419 of file image.c.

void reset_image_data ( void  )

Definition at line 387 of file image.c.


Variable Documentation

Definition at line 62 of file image.c.

Referenced by Face2Cmd(), get_image_sums(), image_add_hash(), and image_process_line().

Definition at line 64 of file image.c.

Initial value:
 {
100, 100,           80 ,        60 ,
50 ,   45 ,     40 ,
35 ,   35 ,     33 
}

Definition at line 87 of file image.c.

Referenced by create_and_rescale_image_from_data().

int last_face_num = 0

Definition at line 69 of file image.c.

Referenced by find_face_in_private_cache().

char* name
GtkAdjustment* padj = NULL [static]

Definition at line 418 of file image.c.

Referenced by image_update_download_status().

GtkWidget* pbar = NULL [static]

Definition at line 417 of file image.c.

Referenced by image_update_download_status().

GtkWidget * pbar_window = NULL [static]

Definition at line 417 of file image.c.

Referenced by image_update_download_status().

Definition at line 63 of file image.c.

struct { ... } private_cache[MAXPIXMAPNUM]
const char* const rcsid_gtk_image_c = "$Id: image.c 9201 2008-06-01 17:32:45Z anmaster $"

Definition at line 1 of file image.c.

Definition at line 64 of file image.c.