Back to index

lightning-sunbird  0.9+nobinonly
Classes | Typedefs | Functions
cairo-win32-private.h File Reference
#include <cairo-win32.h>
#include <cairoint.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _cairo_win32_surface

Typedefs

typedef struct _cairo_win32_surface cairo_win32_surface_t

Functions

cairo_status_t _cairo_win32_print_gdi_error (const char *context)
 _cairo_win32_print_gdi_error: : context string to display along with the error
cairo_surface_t * _cairo_win32_surface_create_dib (cairo_format_t format, int width, int height)
 _cairo_win32_surface_create_dib: : format of pixels in the surface to create : width of the surface, in pixels : height of the surface, in pixels
cairo_bool_t _cairo_surface_is_win32 (cairo_surface_t *surface)
 _cairo_surface_is_win32: : a #cairo_surface_t

Class Documentation

struct _cairo_win32_surface

Definition at line 42 of file cairo-win32-private.h.

Collaboration diagram for _cairo_win32_surface:
Class Members
cairo_surface_t base
HBITMAP bitmap
cairo_rectangle_t clip_rect
HDC dc
cairo_surface_t * dst_image
cairo_format_t format
HRGN saved_clip
HBITMAP saved_dc_bitmap
int set_clip
cairo_surface_t * src_image

Typedef Documentation


Function Documentation

cairo_bool_t _cairo_surface_is_win32 ( cairo_surface_t *  surface)

_cairo_surface_is_win32: : a #cairo_surface_t

Checks if a surface is an cairo_win32_surface_t

Return value: True if the surface is an win32 surface

Definition at line 1038 of file cairo-win32-surface.c.

{
    return surface->backend == &cairo_win32_surface_backend;
}

Here is the caller graph for this function:

_cairo_win32_print_gdi_error: : context string to display along with the error

Helper function to dump out a human readable form of the current error code.

Return value: A cairo status code for the error code

Definition at line 52 of file cairo-win32-surface.c.

{
    void *lpMsgBuf;
    DWORD last_error = GetLastError ();

    if (!FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER | 
                      FORMAT_MESSAGE_FROM_SYSTEM,
                      NULL,
                      last_error,
                      MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
                      (LPTSTR) &lpMsgBuf,
                      0, NULL)) {
       fprintf (stderr, "%s: Unknown GDI error", context);
    } else {
       fprintf (stderr, "%s: %s", context, (char *)lpMsgBuf);
       
       LocalFree (lpMsgBuf);
    }

    /* We should switch off of last_status, but we'd either return
     * CAIRO_STATUS_NO_MEMORY or CAIRO_STATUS_UNKNOWN_ERROR and there
     * is no CAIRO_STATUS_UNKNOWN_ERROR.
     */

    return CAIRO_STATUS_NO_MEMORY;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_surface_t* _cairo_win32_surface_create_dib ( cairo_format_t  format,
int  width,
int  height 
)

_cairo_win32_surface_create_dib: : format of pixels in the surface to create : width of the surface, in pixels : height of the surface, in pixels

Creates a device-independent-bitmap surface not associated with any particular existing surface or device context. The created bitmap will be unititialized.

Return value: the newly created surface, or NULL if it couldn't be created (probably because of lack of memory)

Definition at line 335 of file cairo-win32-surface.c.

Here is the call graph for this function:

Here is the caller graph for this function: