Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 8100 → Rev 8101

/programs/develop/ktcc/trunk/libc/include/kos/gb.h
0,0 → 1,19
 
#pragma pack(push, 1)
typedef struct
{
int w;
int h;
char *bmp;
char *alpha;
} GB_BMP;
#pragma pack(pop)
 
void gb_pixel_set(GB_BMP *b, int x, int y, unsigned c);
int gb_pixel_get(GB_BMP *b, int x, int y, unsigned *c);
void gb_line(GB_BMP *b, int x1, int y1, int x2, int y2, unsigned c);
void gb_rect(GB_BMP *b, int x, int y, int w, int h, unsigned c);
void gb_bar(GB_BMP *b, int x, int y, int w, int h, unsigned c);
void gb_circle(GB_BMP *b, int x, int y, int r, unsigned c);
void gb_image_set(GB_BMP *b_dest, int x_d, int y_d, GB_BMP *b_src, int x_s, int y_s, int w, int h);
void gb_image_set_t(GB_BMP *b_dest, int x_d, int y_d, GB_BMP *b_src, int x_s, int y_s, int w, int h, unsigned c);
/programs/develop/ktcc/trunk/libc/include/kos/libimg.h
0,0 → 1,64
#ifndef KOLIBRI_LIBIMG_H
#define KOLIBRI_LIBIMG_H
 
extern int kolibri_libimg_init(void);
 
//list of format id's
#define LIBIMG_FORMAT_BMP 1
#define LIBIMG_FORMAT_ICO 2
#define LIBIMG_FORMAT_CUR 3
#define LIBIMG_FORMAT_GIF 4
#define LIBIMG_FORMAT_PNG 5
#define LIBIMG_FORMAT_JPEG 6
#define LIBIMG_FORMAT_TGA 7
#define LIBIMG_FORMAT_PCX 8
#define LIBIMG_FORMAT_XCF 9
#define LIBIMG_FORMAT_TIFF 10
#define LIBIMG_FORMAT_PNM 11
#define LIBIMG_FORMAT_WBMP 12
#define LIBIMG_FORMAT_XBM 13
#define LIBIMG_FORMAT_Z80 14
 
//error codes
#define LIBIMG_ERROR_OUT_OF_MEMORY 1
#define LIBIMG_ERROR_FORMAT 2
#define LIBIMG_ERROR_CONDITIONS 3
#define LIBIMG_ERROR_BIT_DEPTH 4
#define LIBIMG_ERROR_ENCODER 5
#define LIBIMG_ERROR_SRC_TYPE 6
#define LIBIMG_ERROR_SCALE 7
#define LIBIMG_ERROR_INTER 8
#define LIBIMG_ERROR_NOT_INPLEMENTED 9
#define LIBIMG_ERROR_INVALID_INPUT 10
 
//encode flags (byte 0x02 of _common option)
#define LIBIMG_ENCODE_STRICT_SPECIFIC 0x01
#define LIBIMG_ENCODE_STRICT_BIT_DEPTH 0x02
#define LIBIMG_ENCODE_DELETE_ALPHA 0x08
#define LIBIMG_ENCODE_FLUSH_ALPHA 0x10
 
 
#define FLIP_VERTICAL 0x01
#define FLIP_HORIZONTAL 0x02
 
#define ROTATE_90_CW 0x01
#define ROTATE_180 0x02
#define ROTATE_270_CW 0x03
#define ROTATE_90_CCW ROTATE_270_CW
#define ROTATE_270_CCW ROTATE_90_CW
 
extern void* (*img_decode __attribute__((__stdcall__)))(void *, uint32_t, uint32_t);
extern void* (*img_encode __attribute__((__stdcall__)))(void *, uint32_t, uint32_t);
extern void* (*img_create __attribute__((__stdcall__)))(uint32_t, uint32_t, uint32_t);
extern void (*img_to_rgb2 __attribute__((__stdcall__)))(void *, void *);
extern void* (*img_to_rgb __attribute__((__stdcall__)))(void *);
extern uint32_t (*img_flip __attribute__((__stdcall__)))(void *, uint32_t);
extern uint32_t (*img_flip_layer __attribute__((__stdcall__)))(void *, uint32_t);
extern uint32_t (*img_rotate __attribute__((__stdcall__)))(void *, uint32_t);
extern uint32_t (*img_rotate_layer __attribute__((__stdcall__)))(void *, uint32_t);
extern void (*img_draw __attribute__((__stdcall__)))(void *, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t );
extern uint32_t (*img_count __attribute__((__stdcall__)))(void *);
extern uint32_t (*img_destroy __attribute__((__stdcall__)))(void *) ;
extern uint32_t (*img_destroy_layer __attribute__((__stdcall__)))(void *);
 
#endif /* KOLIBRI_LIBIMG_H */
/programs/develop/ktcc/trunk/libc/include/kos/msgbox.h
16,9 → 16,9
 
typedef void (*msgbox_callback)(void);
 
extern void (*msgbox_create)(msgbox *, void *thread) __attribute__((__stdcall__)); // clears callbacks, ! if fix lib, we can return eax as of Fn51
extern void (*msgbox_setfunctions)(msgbox_callback*) __attribute__((__stdcall__)); // must be called immediately after create, zero-ended array
extern void (*msgbox_reinit)(msgbox *) __attribute__((__stdcall__)); // recalc sizes when structure changes, called auto when MsgBoxCreate
extern void (*msgbox_create __attribute__((__stdcall__)))(msgbox *, void *thread); // clears callbacks, ! if fix lib, we can return eax as of Fn51
extern void (*msgbox_setfunctions __attribute__((__stdcall__)))(msgbox_callback*); // must be called immediately after create, zero-ended array
extern void (*msgbox_reinit __attribute__((__stdcall__)))(msgbox *) ; // recalc sizes when structure changes, called auto when MsgBoxCreate
 
static inline msgbox* kolibri_new_msgbox(char* title, char* text, int def_but, ...)
/// text can be multilined by code 13 = "\r"
/programs/develop/ktcc/trunk/libc/include/kos/rasterworks.h
0,0 → 1,11
#ifndef KOLIBRI_RASTERWORKS_H
#define KOLIBRI_RASTERWORKS_H
 
//extern int kolibri_rasterworks_init(void);
 
extern void (*drawText __attribute__((__stdcall__)))(void *canvas, int x, int y, const char *string, int charQuantity, int fontColor, int params);
extern int (*countUTF8Z __attribute__((__stdcall__)))(const char *string, int byteQuantity);
extern int (*charsFit __attribute__((__stdcall__)))(int areaWidth, int charHeight);
extern int (*strWidth __attribute__((__stdcall__)))(int charQuantity, int charHeight);
 
#endif /* KOLIBRI_RASTERWORKS_H */