gdkpixmap-win32.c File Reference

#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "gdkpixmap.h"
#include "gdkprivate.h"
#include "gdkwin32.h"

Go to the source code of this file.

Classes

struct  _GdkPixmapColor
struct  _GdkPixmapInfo
struct  file_handle
struct  mem_handle

Defines

#define MAX_COLOR_LEN   120

Enumerations

enum  buffer_op

Functions

static void gdk_win32_pixmap_destroy (GdkPixmap *pixmap)
static GdkDrawablegdk_win32_pixmap_alloc (void)
GdkPixmapgdk_pixmap_new (GdkWindow *window, gint width, gint height, gint depth)
GdkPixmapgdk_pixmap_create_on_shared_image (GdkImage **image_return, GdkWindow *window, GdkVisual *visual, gint width, gint height, gint depth)
GdkPixmapgdk_bitmap_create_from_data (GdkWindow *window, const gchar *data, gint width, gint height)
GdkPixmapgdk_pixmap_create_from_data (GdkWindow *window, const gchar *data, gint width, gint height, gint depth, GdkColor *fg, GdkColor *bg)
static gint gdk_pixmap_seek_string (FILE *infile, const gchar *str, gint skip_comments)
static gint gdk_pixmap_seek_char (FILE *infile, gchar c)
static gint gdk_pixmap_read_string (FILE *infile, gchar **buffer, guint *buffer_size)
static gchargdk_pixmap_skip_whitespaces (gchar *buffer)
static gchargdk_pixmap_skip_string (gchar *buffer)
static gchargdk_pixmap_extract_color (gchar *buffer)
static void gdk_xpm_destroy_notify (gpointer data)
static GdkPixmap_gdk_pixmap_create_from_xpm (GdkWindow *window, GdkColormap *colormap, GdkBitmap **mask, GdkColor *transparent_color, gchar *(*get_buf)(enum buffer_opop, gpointer handle), gpointer handle)
static gcharfile_buffer (enum buffer_op op, gpointer handle)
GdkPixmapgdk_pixmap_colormap_create_from_xpm (GdkWindow *window, GdkColormap *colormap, GdkBitmap **mask, GdkColor *transparent_color, const gchar *filename)
GdkPixmapgdk_pixmap_create_from_xpm (GdkWindow *window, GdkBitmap **mask, GdkColor *transparent_color, const gchar *filename)
static gcharmem_buffer (enum buffer_op op, gpointer handle)
GdkPixmapgdk_pixmap_colormap_create_from_xpm_d (GdkWindow *window, GdkColormap *colormap, GdkBitmap **mask, GdkColor *transparent_color, gchar **data)
GdkPixmapgdk_pixmap_create_from_xpm_d (GdkWindow *window, GdkBitmap **mask, GdkColor *transparent_color, gchar **data)
GdkPixmapgdk_pixmap_foreign_new (guint32 anid)

Variables

static unsigned char mirror [256]


Define Documentation

#define MAX_COLOR_LEN   120

Definition at line 477 of file gdkpixmap-win32.c.

Referenced by gdk_pixmap_extract_color().


Enumeration Type Documentation

enum buffer_op

Definition at line 547 of file gdkpixmap-win32.c.


Function Documentation

static GdkPixmap* _gdk_pixmap_create_from_xpm ( GdkWindow window,
GdkColormap colormap,
GdkBitmap **  mask,
GdkColor transparent_color,
gchar *(*)(enum buffer_opop, gpointer handle)  get_buf,
gpointer  handle 
) [static]

Definition at line 569 of file gdkpixmap-win32.c.

References buffer, xmlio::cnt, _GdkPixmapInfo::colormap, colors, _GdkVisual::depth, error, FALSE, g_free(), g_hash_table_destroy(), g_hash_table_insert(), g_hash_table_lookup(), g_hash_table_new(), g_malloc(), g_new, g_str_equal(), g_str_hash(), g_warning(), gchar, gdk_color_alloc(), gdk_color_parse(), gdk_color_white(), gdk_colormap_ref(), gdk_draw_image(), gdk_draw_line(), gdk_draw_rectangle(), gdk_drawable_get_colormap(), gdk_drawable_get_visual(), gdk_drawable_set_data(), gdk_gc_new(), gdk_gc_set_foreground(), gdk_gc_unref(), GDK_IMAGE_FASTEST, gdk_image_new(), gdk_image_put_pixel(), gdk_image_unref(), gdk_parent_root, gdk_pixmap_extract_color(), gdk_pixmap_new(), GDK_VISUAL_GRAYSCALE, GDK_VISUAL_PSEUDO_COLOR, gdk_xpm_destroy_notify(), height, image, mask, n, _GdkPixmapInfo::ncolors, NULL, num_cols, op_body, op_cmap, op_header, _GdkColor::pixel, _GdkPixmapInfo::pixels, TRUE, _GdkVisual::type, and width.

Referenced by gdk_pixmap_colormap_create_from_xpm(), and gdk_pixmap_colormap_create_from_xpm_d().

static gchar* file_buffer ( enum buffer_op  op,
gpointer  handle 
) [static]

Definition at line 769 of file gdkpixmap-win32.c.

References FALSE, fseek, gdk_pixmap_read_string(), gdk_pixmap_seek_char(), gdk_pixmap_seek_string(), h, op_body, op_cmap, op_header, SEEK_CUR, and TRUE.

Referenced by gdk_pixmap_colormap_create_from_xpm().

GdkPixmap* gdk_bitmap_create_from_data ( GdkWindow window,
const gchar data,
gint  width,
gint  height 
)

Definition at line 285 of file gdkpixmap-win32.c.

References bits, CreateBitmap(), g_free(), g_malloc(), g_print(), g_return_val_if_fail, GDK_DRAWABLE_DESTROYED, GDK_DRAWABLE_WIN32DATA, GDK_DRAWABLE_XID, GDK_IS_WINDOW, GDK_NOTE, gdk_parent_root, gdk_win32_pixmap_alloc(), gdk_xid_table_insert(), i, j, mirror, and NULL.

Referenced by TGWin32::CreateBitmap(), gdk_pixmap_create_from_data(), gdk_win32_gc_values_to_win32values(), TGWin32::OpenDisplay(), and TGWin32::UpdateFillStyle().

GdkPixmap* gdk_pixmap_colormap_create_from_xpm ( GdkWindow window,
GdkColormap colormap,
GdkBitmap **  mask,
GdkColor transparent_color,
const gchar filename 
)

Definition at line 794 of file gdkpixmap-win32.c.

References _gdk_pixmap_create_from_xpm(), fclose(), file_buffer(), fopen, g_free(), h, mask, and NULL.

Referenced by gdk_pixmap_create_from_xpm().

GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d ( GdkWindow window,
GdkColormap colormap,
GdkBitmap **  mask,
GdkColor transparent_color,
gchar **  data 
)

Definition at line 845 of file gdkpixmap-win32.c.

References _gdk_pixmap_create_from_xpm(), h, mask, mem_buffer(), and NULL.

Referenced by gdk_pixmap_create_from_xpm_d().

GdkPixmap* gdk_pixmap_create_from_data ( GdkWindow window,
const gchar data,
gint  width,
gint  height,
gint  depth,
GdkColor fg,
GdkColor bg 
)

Definition at line 331 of file gdkpixmap-win32.c.

References fg(), g_print(), gdk_bitmap_create_from_data(), gdk_draw_drawable(), gdk_drawable_unref(), GDK_DRAWABLE_XID, gdk_gc_new(), gdk_gc_set_background(), gdk_gc_set_foreground(), gdk_gc_unref(), GDK_NOTE, gdk_pixmap_new(), and result().

Referenced by TGWin32::CreatePixmap().

GdkPixmap* gdk_pixmap_create_from_xpm ( GdkWindow window,
GdkBitmap **  mask,
GdkColor transparent_color,
const gchar filename 
)

Definition at line 817 of file gdkpixmap-win32.c.

References gdk_pixmap_colormap_create_from_xpm(), mask, and NULL.

Referenced by TGWin32::CreatePictureFromFile(), and TGWin32::ReadPictureDataFromFile().

GdkPixmap* gdk_pixmap_create_from_xpm_d ( GdkWindow window,
GdkBitmap **  mask,
GdkColor transparent_color,
gchar **  data 
)

Definition at line 862 of file gdkpixmap-win32.c.

References gdk_pixmap_colormap_create_from_xpm_d(), mask, and NULL.

Referenced by TGWin32::CreatePictureFromData().

GdkPixmap* gdk_pixmap_create_on_shared_image ( GdkImage **  image_return,
GdkWindow window,
GdkVisual visual,
gint  width,
gint  height,
gint  depth 
)

Definition at line 208 of file gdkpixmap-win32.c.

References _GdkVisual::depth, g_print(), g_return_val_if_fail, GDK_DRAWABLE_WIN32DATA, GDK_DRAWABLE_XID, gdk_image_bitmap_new(), gdk_image_new(), GDK_IMAGE_SHARED_PIXMAP, GDK_NOTE, gdk_win32_pixmap_alloc(), gdk_xid_table_insert(), and NULL.

static gchar* gdk_pixmap_extract_color ( gchar buffer  )  [static]

Definition at line 479 of file gdkpixmap-win32.c.

References g_new, g_strdup(), gchar, gdk_pixmap_skip_string(), gdk_pixmap_skip_whitespaces(), MAX_COLOR_LEN, MIN, NULL, ptr, strcat(), x09, and x20.

Referenced by _gdk_pixmap_create_from_xpm().

GdkPixmap* gdk_pixmap_foreign_new ( guint32  anid  ) 

Definition at line 871 of file gdkpixmap-win32.c.

References g_return_val_if_fail, GDK_DRAWABLE_WIN32DATA, GDK_DRAWABLE_XID, gdk_win32_pixmap_alloc(), gdk_xid_table_insert(), NULL, and size.

Referenced by TGWin32::AddPixmap(), and TGWin32::CreatePixmapFromData().

GdkPixmap* gdk_pixmap_new ( GdkWindow window,
gint  width,
gint  height,
gint  depth 
)

Definition at line 90 of file gdkpixmap-win32.c.

References BI_RGB, tagBITMAPINFOHEADER::biBitCount, tagBITMAPINFOHEADER::biClrImportant, tagBITMAPINFOHEADER::biClrUsed, tagBITMAPINFOHEADER::biCompression, tagBITMAPINFOHEADER::biHeight, tagBITMAPINFOHEADER::biPlanes, tagBITMAPINFOHEADER::biSize, tagBITMAPINFOHEADER::biSizeImage, bits, tagBITMAPINFOHEADER::biWidth, tagBITMAPINFOHEADER::biXPelsPerMeter, tagBITMAPINFOHEADER::biYPelsPerMeter, _GdkVisual::blue_mask, bmi, tagBITMAPINFO::bmiColors, tagBITMAPINFO::bmiHeader, _GdkVisual::depth, DWORD, g_free(), g_print(), g_return_val_if_fail, g_warning(), gdk_colormap_get_system(), GDK_DRAWABLE_DESTROYED, gdk_drawable_get_visual(), GDK_DRAWABLE_WIN32DATA, GDK_DRAWABLE_XID, GDK_IS_WINDOW, GDK_NOTE, gdk_parent_root, gdk_win32_pixmap_alloc(), gdk_xid_table_insert(), _GdkVisual::green_mask, HDC(), i, if(), NULL, private, PVOID, _GdkVisual::red_mask, tagRGBQUAD::rgbBlue, tagRGBQUAD::rgbGreen, tagRGBQUAD::rgbRed, tagRGBQUAD::rgbReserved, u, and WIN32_GDI_FAILED.

Referenced by _gdk_pixmap_create_from_xpm(), TGWin32::CreatePixmap(), gdk_pixmap_create_from_data(), gdk_win32_gc_get_values(), TGWin32::OpenPixmap(), TGWin32::RescaleWindow(), TGWin32::ResizePixmap(), TGWin32::ResizeWindow(), TGWin32::SetDoubleBufferON(), test_arcs(), test_gcs(), test_lines(), test_pixmaps(), test_points(), and test_rectangles().

static gint gdk_pixmap_read_string ( FILE *  infile,
gchar **  buffer,
guint buffer_size 
) [static]

Definition at line 407 of file gdkpixmap-win32.c.

References buf, c, xmlio::cnt, EOF, FALSE, g_new, g_realloc(), gchar, NULL, out, and TRUE.

Referenced by file_buffer().

static gint gdk_pixmap_seek_char ( FILE *  infile,
gchar  c 
) [static]

Definition at line 381 of file gdkpixmap-win32.c.

References b, EOF, FALSE, and TRUE.

Referenced by file_buffer().

static gint gdk_pixmap_seek_string ( FILE *  infile,
const gchar str,
gint  skip_comments 
) [static]

Definition at line 361 of file gdkpixmap-win32.c.

References FALSE, and TRUE.

Referenced by file_buffer().

static gchar* gdk_pixmap_skip_string ( gchar buffer  )  [static]

Definition at line 466 of file gdkpixmap-win32.c.

References x09, and x20.

Referenced by gdk_pixmap_extract_color().

static gchar* gdk_pixmap_skip_whitespaces ( gchar buffer  )  [static]

Definition at line 455 of file gdkpixmap-win32.c.

References x09, and x20.

Referenced by gdk_pixmap_extract_color().

static GdkDrawable* gdk_win32_pixmap_alloc ( void   )  [static]

Definition at line 65 of file gdkpixmap-win32.c.

References _gdk_win32_drawable_class, _GdkDrawableClass::destroy, FALSE, g_new, gdk_drawable_alloc(), GDK_DRAWABLE_PIXMAP, gdk_win32_pixmap_destroy(), and TRUE.

Referenced by gdk_bitmap_create_from_data(), gdk_pixmap_create_on_shared_image(), gdk_pixmap_foreign_new(), and gdk_pixmap_new().

static void gdk_win32_pixmap_destroy ( GdkPixmap pixmap  )  [static]

Definition at line 50 of file gdkpixmap-win32.c.

References g_free(), g_print(), GDK_DRAWABLE_WIN32DATA, GDK_DRAWABLE_XID, GDK_NOTE, gdk_xid_table_remove(), and WIN32_GDI_FAILED.

Referenced by gdk_win32_pixmap_alloc().

static void gdk_xpm_destroy_notify ( gpointer  data  )  [static]

Definition at line 554 of file gdkpixmap-win32.c.

References g_free(), gdk_colormap_free_colors(), gdk_colormap_unref(), i, and info.

Referenced by _gdk_pixmap_create_from_xpm().

static gchar* mem_buffer ( enum buffer_op  op,
gpointer  handle 
) [static]

Definition at line 832 of file gdkpixmap-win32.c.

References h, op_body, op_cmap, and op_header.

Referenced by gdk_pixmap_colormap_create_from_xpm_d().


Variable Documentation

unsigned char mirror[256] [static]

Definition at line 250 of file gdkpixmap-win32.c.

Referenced by build_image_from_xml(), and gdk_bitmap_create_from_data().


Generated on Tue Jul 5 15:58:42 2011 for ROOT_528-00b_version by  doxygen 1.5.1