Show winalleg.h syntax highlighted
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Windows header file for the Allegro library.
*
* It must be included by Allegro programs that need to use
* direct Win32 API calls and by Win32 programs that need to
* interface with Allegro.
*
* By Shawn Hargreaves.
*
* See readme.txt for copyright information.
*/
#ifndef WIN_ALLEGRO_H
#define WIN_ALLEGRO_H
#ifndef ALLEGRO_H
#error Please include allegro.h before winalleg.h!
#endif
#ifdef ALLEGRO_SRC
#define WIN32_LEAN_AND_MEAN /* to save compilation time */
#endif
#ifndef ALLEGRO_NO_MAGIC_MAIN
#define NO_STRICT /* needed by the magic main emulation */
#endif
#if (!defined SCAN_EXPORT) && (!defined SCAN_DEPEND)
#ifdef ALLEGRO_AND_MFC
#include <afxwin.h>
#else
#include <windows.h>
#endif
#endif
/* Allegro's Win32 specific interface */
#ifdef __cplusplus
extern "C" {
#endif
/* external graphics driver support */
typedef struct WIN_GFX_DRIVER {
int has_backing_store;
AL_METHOD(void, switch_in, (void));
AL_METHOD(void, switch_out, (void));
AL_METHOD(void, enter_sysmode, (void));
AL_METHOD(void, exit_sysmode, (void));
AL_METHOD(void, move, (int x, int y, int w, int h));
AL_METHOD(void, iconify, (void));
AL_METHOD(void, paint, (RECT *al_draw_rect));
} WIN_GFX_DRIVER;
AL_VAR(WIN_GFX_DRIVER *, win_gfx_driver);
AL_FUNC(void, win_grab_input, (void));
/* external window support */
AL_FUNC(HWND, alwin_get_window, (void));
AL_FUNC(void, alwin_set_window, (HWND wnd));
AL_FUNC(void, alwin_set_wnd_create_proc, (AL_METHOD(HWND, proc, (WNDPROC))));
/* GDI to DirectDraw routines */
AL_FUNC(HDC, alwin_get_dc, (AL_BITMAP *bmp));
AL_FUNC(void, alwin_release_dc, (AL_BITMAP *bmp, HDC dc));
/* GDI routines */
AL_FUNC(void, alwin_set_gdi_color_format, (void));
AL_FUNC(void, alwin_set_palette, (HDC dc, AL_PALETTE pal));
AL_FUNC(HPALETTE, alwin_convert_palette_to_hpalette, (AL_PALETTE pal));
AL_FUNC(void, alwin_convert_hpalette_to_palette, (HPALETTE hpal, AL_PALETTE pal));
AL_FUNC(HBITMAP, alwin_convert_bitmap_to_hbitmap, (AL_BITMAP *bitmap));
AL_FUNC(AL_BITMAP *, alwin_convert_hbitmap_to_bitmap, (HBITMAP bitmap));
AL_FUNC(void, alwin_draw_sprite, (HDC dc, AL_BITMAP *bitmap, int x, int y));
AL_FUNC(void, alwin_blit_to_hdc, (AL_BITMAP *bitmap, HDC dc, int src_x, int src_y, int dest_x, int dest_y, int w, int h));
AL_FUNC(void, alwin_stretch_to_hdc, (AL_BITMAP *bitmap, HDC dc, int src_x, int src_y, int src_w, int src_h, int dest_x, int dest_y, int dest_w, int dest_h));
AL_FUNC(void, alwin_blit_from_hdc, (HDC dc, AL_BITMAP *bitmap, int src_x, int src_y, int dest_x, int dest_y, int w, int h));
AL_FUNC(void, alwin_stretch_from_hdc, (HDC hdc, AL_BITMAP *bitmap, int src_x, int src_y, int src_w, int src_h, int dest_x, int dest_y, int dest_w, int dest_h));
#ifdef __cplusplus
}
#endif
#endif /* ifndef WIN_ALLEGRO_H */
See more files for this project here