/programs/develop/ktcc/trunk/libc.obj/include/clayer/boxlib.h |
---|
8,7 → 8,6 |
#include <sys/ksys.h> |
typedef unsigned color_t; |
int kolibri_boxlib_init(void); |
/* flags meaning */ |
#define ed_figure_only 0b1000000000000000 // одни символы |
69,10 → 68,10 |
uint32_t ar_offset; |
} __attribute__((__packed__)) scrollbar; |
extern void __stdcall (*scrollbar_h_draw)(scrollbar*); |
extern void __stdcall (*scrollbar_h_mouse)(scrollbar*); |
extern void __stdcall (*scrollbar_v_draw)(scrollbar*); |
extern void __stdcall (*scrollbar_v_mouse)(scrollbar*); |
DLLAPI void __stdcall scrollbar_h_draw(scrollbar*); |
DLLAPI void __stdcall scrollbar_h_mouse(scrollbar*); |
DLLAPI void __stdcall scrollbar_v_draw(scrollbar*); |
DLLAPI void __stdcall scrollbar_v_mouse(scrollbar*); |
// CHECKBOX |
typedef struct { |
89,9 → 88,9 |
unsigned int size_of_str; |
} check_box; |
extern void __stdcall (*check_box_draw2)(check_box*); |
extern void __stdcall (*check_box_mouse2)(check_box*); |
extern void __stdcall (*init_checkbox2)(check_box*); |
DLLAPI void __stdcall check_box_draw2(check_box*); |
DLLAPI void __stdcall check_box_mouse2(check_box*); |
DLLAPI void __stdcall init_checkbox2(check_box*); |
// DBUTTON |
typedef struct { |
111,8 → 110,8 |
uint32_t click; // clicked - 1, zero it after tested |
} pict_button; |
extern void __stdcall (*dynamic_button_draw)(pict_button*); |
extern void __stdcall (*dynamic_button_mouse)(pict_button*); |
DLLAPI void __stdcall dynamic_button_draw(pict_button*); |
DLLAPI void __stdcall dynamic_button_mouse(pict_button*); |
// EDITBOX |
144,12 → 143,12 |
} edit_box; |
#pragma pack(pop) |
extern void __stdcall (*edit_box_draw)(edit_box*); |
extern void __stdcall (*edit_box_key)(edit_box*, unsigned int key_val); |
extern void __stdcall (*edit_box_mouse)(edit_box*); |
extern void __stdcall (*edit_box_set_text)(edit_box*, char*); |
DLLAPI void __stdcall edit_box_draw(edit_box*); |
DLLAPI void __stdcall edit_box_key(edit_box*, unsigned int key_val); |
DLLAPI void __stdcall edit_box_mouse(edit_box*); |
DLLAPI void __stdcall edit_box_set_text(edit_box*, char*); |
extern void __stdcall (*edit_box_key_safe)(edit_box* e, ksys_oskey_t ch); |
DLLAPI void __stdcall edit_box_key_safe(edit_box* e, ksys_oskey_t ch); |
// FRAME |
typedef struct { |
167,7 → 166,7 |
color_t font_bg_color; |
} frame; |
extern void __stdcall (*frame_draw)(frame*); |
DLLAPI void __stdcall frame_draw(frame*); |
// MENUBAR |
typedef struct |
208,9 → 207,9 |
uint32_t get_mouse_flag; |
} menubar; |
extern void __stdcall (*menu_bar_draw)(menubar*); |
extern void __stdcall (*menu_bar_mouse)(menubar*); |
extern void __stdcall (*menu_bar_activate)(menubar*); |
DLLAPI void __stdcall menu_bar_draw(menubar*); |
DLLAPI void __stdcall menu_bar_mouse(menubar*); |
DLLAPI void __stdcall menu_bar_activate(menubar*); |
// OPTIONBOX |
typedef struct option_box_t { |
227,8 → 226,8 |
uint32_t flags; |
} __attribute__((__packed__)) option_box; |
extern void __stdcall (*option_box_draw)(option_box**); |
extern void __stdcall (*option_box_mouse)(option_box**); |
DLLAPI void __stdcall option_box_draw(option_box**); |
DLLAPI void __stdcall option_box_mouse(option_box**); |
// PATHSHOW |
typedef struct { |
245,8 → 244,8 |
uint32_t temp_text_length; |
} __attribute__((__packed__)) pathview; |
extern void __stdcall (*path_show_prepare)(pathview*); |
extern void __stdcall (*path_show_draw)(pathview*); |
DLLAPI void __stdcall path_show_prepare(pathview*); |
DLLAPI void __stdcall path_show_draw(pathview*); |
// PROGRESSBAR |
typedef struct { |
263,7 → 262,7 |
unsigned int frame_color; |
} progressbar; |
extern void __stdcall (*progressbar_draw)(progressbar*); |
extern void __stdcall (*progressbar_progress)(progressbar*); |
DLLAPI void __stdcall progressbar_draw(progressbar*); |
DLLAPI void __stdcall progressbar_progress(progressbar*); |
#endif /* KOLIBRI_BOXLIB_H */ |
/programs/develop/ktcc/trunk/libc.obj/include/clayer/buf2d.h |
---|
30,11 → 30,9 |
BUF2D_OPT_CROP_RIGHT = 8 |
}; |
int kolibri_buf2d_init(void); |
DLLAPI void __stdcall buf2d_create_asm(buf2d_struct*); |
DLLAPI void __stdcall buf2d_curve_bezier_asm(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int); |
extern void __stdcall (*buf2d_create_asm)(buf2d_struct*); |
extern void __stdcall (*buf2d_curve_bezier_asm)(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int); |
buf2d_struct* buf2d_create(uint16_t tlx, uint16_t tly, unsigned int sizex, unsigned int sizey, unsigned int font_bgcolor, uint8_t color_bit) |
{ |
buf2d_struct* new_buf2d_struct = (buf2d_struct*)_ksys_alloc(sizeof(buf2d_struct)); |
53,31 → 51,31 |
buf2d_curve_bezier_asm(buf, (p0_x << 16) + p0_y, (p1_x << 16) + p1_y, (p2_x << 16) + p2_y, color); |
} |
extern void __stdcall (*buf2d_draw)(buf2d_struct*); |
extern void __stdcall (*buf2d_clear)(buf2d_struct*, unsigned int); |
extern void __stdcall (*buf2d_delete)(buf2d_struct*); |
extern void __stdcall (*buf2d_rotate)(buf2d_struct*, unsigned int); |
extern void __stdcall (*buf2d_resize)(buf2d_struct*, unsigned int, unsigned int, unsigned int); |
extern void __stdcall (*buf2d_line)(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int); |
extern void __stdcall (*buf2d_line_sm)(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int); |
extern void __stdcall (*buf2d_rect_by_size)(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int); |
extern void __stdcall (*buf2d_filled_rect_by_size)(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int); |
extern void __stdcall (*buf2d_circle)(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int); |
extern void __stdcall (*buf2d_img_hdiv2)(buf2d_struct*); |
extern void __stdcall (*buf2d_img_wdiv2)(buf2d_struct*); |
extern void __stdcall (*buf2d_conv_24_to_8)(buf2d_struct*, unsigned int); |
extern void __stdcall (*buf2d_conv_24_to_32)(buf2d_struct*, unsigned int); |
extern void __stdcall (*buf2d_bit_blt_transp)(buf2d_struct*, unsigned int, unsigned int, buf2d_struct*); |
extern void __stdcall (*buf2d_bit_blt_alpha)(buf2d_struct*, unsigned int, unsigned int, buf2d_struct*); |
extern void __stdcall (*buf2d_convert_text_matrix)(buf2d_struct*); |
extern void __stdcall (*buf2d_draw_text)(buf2d_struct*, buf2d_struct*, const char*, unsigned int, unsigned int); |
extern void __stdcall (*buf2d_crop_color)(buf2d_struct*, unsigned int, unsigned int); |
extern void __stdcall (*buf2d_offset_h)(buf2d_struct*, unsigned int, unsigned int, unsigned int); |
extern void __stdcall (*buf2d_flood_fill)(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int); |
extern void __stdcall (*buf2d_set_pixel)(buf2d_struct*, unsigned int, unsigned int, unsigned int); |
extern unsigned __stdcall (*buf2d_get_pixel)(buf2d_struct*, unsigned int, unsigned int); |
extern void __stdcall (*buf2d_flip_h)(buf2d_struct*); |
extern void __stdcall (*buf2d_flip_v)(buf2d_struct*); |
extern void __stdcall (*buf2d_filter_dither)(buf2d_struct*, unsigned int); |
DLLAPI void __stdcall buf2d_draw(buf2d_struct*); |
DLLAPI void __stdcall buf2d_clear(buf2d_struct*, unsigned int); |
DLLAPI void __stdcall buf2d_delete(buf2d_struct*); |
DLLAPI void __stdcall buf2d_rotate(buf2d_struct*, unsigned int); |
DLLAPI void __stdcall buf2d_resize(buf2d_struct*, unsigned int, unsigned int, unsigned int); |
DLLAPI void __stdcall buf2d_line(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int); |
DLLAPI void __stdcall buf2d_line_sm(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int); |
DLLAPI void __stdcall buf2d_rect_by_size(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int); |
DLLAPI void __stdcall buf2d_filled_rect_by_size(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int); |
DLLAPI void __stdcall buf2d_circle(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int); |
DLLAPI void __stdcall buf2d_img_hdiv2(buf2d_struct*); |
DLLAPI void __stdcall buf2d_img_wdiv2(buf2d_struct*); |
DLLAPI void __stdcall buf2d_conv_24_to_8(buf2d_struct*, unsigned int); |
DLLAPI void __stdcall buf2d_conv_24_to_32(buf2d_struct*, unsigned int); |
DLLAPI void __stdcall buf2d_bit_blt_transp(buf2d_struct*, unsigned int, unsigned int, buf2d_struct*); |
DLLAPI void __stdcall buf2d_bit_blt_alpha(buf2d_struct*, unsigned int, unsigned int, buf2d_struct*); |
DLLAPI void __stdcall buf2d_convert_text_matrix(buf2d_struct*); |
DLLAPI void __stdcall buf2d_draw_text(buf2d_struct*, buf2d_struct*, const char*, unsigned int, unsigned int); |
DLLAPI void __stdcall buf2d_crop_color(buf2d_struct*, unsigned int, unsigned int); |
DLLAPI void __stdcall buf2d_offset_h(buf2d_struct*, unsigned int, unsigned int, unsigned int); |
DLLAPI void __stdcall buf2d_flood_fill(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int); |
DLLAPI void __stdcall buf2d_set_pixel(buf2d_struct*, unsigned int, unsigned int, unsigned int); |
DLLAPI unsigned __stdcall buf2d_get_pixel(buf2d_struct*, unsigned int, unsigned int); |
DLLAPI void __stdcall buf2d_flip_h(buf2d_struct*); |
DLLAPI void __stdcall buf2d_flip_v(buf2d_struct*); |
DLLAPI void __stdcall buf2d_filter_dither(buf2d_struct*, unsigned int); |
#endif /* KOLIBRI_BUF2D_H */ |
/programs/develop/ktcc/trunk/libc.obj/include/clayer/dialog.h |
---|
115,12 → 115,10 |
return new_colordialog; |
} |
void kolibri_dialog_init(); |
DLLAPI void __stdcall OpenDialog_init(open_dialog*); |
DLLAPI void __stdcall OpenDialog_start(open_dialog*); |
extern void __stdcall (*OpenDialog_init)(open_dialog*); |
extern void __stdcall (*OpenDialog_start)(open_dialog*); |
DLLAPI void __stdcall ColorDialog_init(color_dialog*); |
DLLAPI void __stdcall ColorDialog_start(color_dialog*); |
extern void __stdcall (*ColorDialog_init)(color_dialog*); |
extern void __stdcall (*ColorDialog_start)(color_dialog*); |
#endif |
/programs/develop/ktcc/trunk/libc.obj/include/clayer/http.h |
---|
79,7 → 79,7 |
Initiates a HTTP connection, using 'GET' method. |
Returns NULL on error, identifier otherwise. |
*/ |
extern http_msg * __stdcall (*http_get)(const char *url, http_msg *identifier, unsigned flags, const char *add_header); |
DLLAPI http_msg * __stdcall http_get(const char *url, http_msg *identifier, unsigned flags, const char *add_header); |
/* |
url = pointer to ASCIIZ URL |
90,7 → 90,7 |
Initiate a HTTP connection, using 'HEAD' method. |
Returns NULL on error, identifier otherwise. |
*/ |
extern http_msg * __stdcall (*http_head)(const char *url, http_msg *identifier, unsigned flags, const char *add_header); |
DLLAPI http_msg * __stdcall http_head(const char *url, http_msg *identifier, unsigned flags, const char *add_header); |
/* |
url = pointer to ASCIIZ URL |
105,7 → 105,7 |
using system function 75, 6. |
Returns 0 on error, identifier otherwise |
*/ |
extern http_msg * __stdcall (*http_post)(const char *url, http_msg *identifier, unsigned flags, const char *add_header, |
DLLAPI http_msg * __stdcall http_post(const char *url, http_msg *identifier, unsigned flags, const char *add_header, |
const char *content_type, unsigned content_length); |
/* |
127,7 → 127,7 |
In content_length you'll find the length of the content. |
In content_received, you'll find the number of content bytes already received. |
*/ |
extern int __stdcall (*http_receive)(http_msg *identifier); |
DLLAPI int __stdcall http_receive(http_msg *identifier); |
/* |
identifier = identifier which one of the previous functions returned |
136,13 → 136,13 |
This procedure can be used to send data to the server (POST) |
Returns number of bytes sent, -1 on error |
*/ |
extern int __stdcall (*http_send)(http_msg *identifier, void *dataptr, unsigned datalength); |
DLLAPI int __stdcall http_send(http_msg *identifier, void *dataptr, unsigned datalength); |
/* |
Sometimes the http_receive function receives incomplete data. If you have the same problem then a macro can help you: |
*/ |
extern int __stdcall (*http_free)(http_msg *identifier); |
DLLAPI int __stdcall http_free(http_msg *identifier); |
/* |
Free unused data |
*/ |
/programs/develop/ktcc/trunk/libc.obj/include/clayer/inputbox.h |
---|
10,7 → 10,7 |
#include <stddef.h> |
extern unsigned __stdcall (*InputBox)(void* Buffer, char* Caption, char* Prompt, char* Default, |
DLLAPI unsigned __stdcall InputBox(void* Buffer, char* Caption, char* Prompt, char* Default, |
unsigned long Flags, unsigned long BufferSize, void* RedrawProc); |
#endif // KOLIBRI_INPUTBOX_H |
/programs/develop/ktcc/trunk/libc.obj/include/clayer/libimg.h |
---|
4,8 → 4,10 |
#define KOLIBRI_LIBIMG_H |
#include <stddef.h> |
#include <stdint.h> |
#include <stdbool.h> |
//list of format id's |
#define LIBIMG_FORMAT_BMP 1 |
#define LIBIMG_FORMAT_ICO 2 |
95,23 → 97,23 |
#define ROTATE_90_CCW ROTATE_270_CW |
#define ROTATE_270_CCW ROTATE_90_CW |
extern Image* __stdcall (*img_decode)(void* file_data, uint32_t size, uint32_t b_color); |
extern Image* __stdcall (*img_encode)(Image* img, uint32_t length, uint32_t option); |
extern Image* __stdcall (*img_create)(uint32_t width, uint32_t height, uint32_t type); |
extern void __stdcall (*img_to_rgb2)(Image* img, void *rgb_data); |
extern Image* __stdcall (*img_to_rgb)(Image* img); |
extern bool __stdcall (*img_flip)(Image* img, uint32_t flip); |
extern bool __stdcall (*img_flip_layer)(Image *img, uint32_t flip); |
extern bool __stdcall (*img_rotate)(Image *img, uint32_t rotate); |
extern bool __stdcall (*img_rotate_layer)(Image* data, uint32_t rotate); |
extern void __stdcall (*img_draw)(Image *img, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t xoff, uint32_t yoff); |
extern int32_t __stdcall (*img_count)(Image *img); |
extern bool __stdcall (*img_destroy)(Image *img); |
extern bool __stdcall (*img_destroy_layer)(Image* img); |
extern Image* __stdcall (*img_blend)(Image* dst, Image* src, uint32_t out_x, uint32_t out_y, uint32_t in_x, uint32_t in_y, uint32_t width, uint32_t height); |
extern Image* __stdcall (*img_convert)(Image *src, Image *dst, uint32_t dst_type, uint32_t, uint32_t); |
extern Image* __stdcall (*img_resize_data)(Image *src, uint32_t width, uint32_t height); |
extern Image* __stdcall (*img_scale)(Image* src, uint32_t crop_x, uint32_t crop_y, uint32_t crop_width, uint32_t crop_height, Image* dst, uint32_t scale_type, uint32_t inter, uint32_t new_width, uint32_t new_height); |
DLLAPI Image* __stdcall img_decode(void* file_data, uint32_t size, uint32_t b_color); |
DLLAPI Image* __stdcall img_encode(Image* img, uint32_t length, uint32_t option); |
DLLAPI Image* __stdcall img_create(uint32_t width, uint32_t height, uint32_t type); |
DLLAPI void __stdcall img_to_rgb2(Image* img, void *rgb_data); |
DLLAPI Image* __stdcall img_to_rgb(Image* img); |
DLLAPI bool __stdcall img_flip(Image* img, uint32_t flip); |
DLLAPI bool __stdcall img_flip_layer(Image *img, uint32_t flip); |
DLLAPI bool __stdcall img_rotate(Image *img, uint32_t rotate); |
DLLAPI bool __stdcall img_rotate_layer(Image* data, uint32_t rotate); |
DLLAPI void __stdcall img_draw(Image *img, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t xoff, uint32_t yoff); |
DLLAPI int32_t __stdcall img_count(Image *img); |
DLLAPI bool __stdcall img_destroy(Image *img); |
DLLAPI bool __stdcall img_destroy_layer(Image* img); |
DLLAPI Image* __stdcall img_blend(Image* dst, Image* src, uint32_t out_x, uint32_t out_y, uint32_t in_x, uint32_t in_y, uint32_t width, uint32_t height); |
DLLAPI Image* __stdcall img_convert(Image *src, Image *dst, uint32_t dst_type, uint32_t, uint32_t); |
DLLAPI Image* __stdcall img_resize_data(Image *src, uint32_t width, uint32_t height); |
DLLAPI Image* __stdcall img_scale(Image* src, uint32_t crop_x, uint32_t crop_y, uint32_t crop_width, uint32_t crop_height, Image* dst, uint32_t scale_type, uint32_t inter, uint32_t new_width, uint32_t new_height); |
void img_fill_color(Image* img, uint32_t width, uint32_t height, uint32_t color){ |
for (uint32_t i = 0; i < width*height; i++) { |
119,6 → 121,4 |
} |
} |
int kolibri_libimg_init(void); |
#endif /* KOLIBRI_LIBIMG_H */ |
/programs/develop/ktcc/trunk/libc.obj/include/clayer/msgbox.h |
---|
3,6 → 3,7 |
#include <stdarg.h> |
#include <stddef.h> |
#include <stdint.h> |
#include <stdlib.h> |
#include <string.h> |
16,9 → 17,9 |
typedef void (*msgbox_callback)(void); |
extern void __stdcall (*mb_create)(msgbox *, void *thread); // clears callbacks, ! if fix lib, we can return eax as of Fn51 |
extern void __stdcall (*mb_setfunctions)(msgbox_callback*); // must be called immediately after create, zero-ended array |
extern void __stdcall (*mb_reinit)(msgbox *); // recalc sizes when structure changes, called auto when MsgBoxCreate |
DLLAPI void __stdcall mb_create(msgbox *, void *thread); // clears callbacks, ! if fix lib, we can return eax as of Fn51 |
DLLAPI void __stdcall mb_setfunctions(msgbox_callback*); // must be called immediately after create, zero-ended array |
DLLAPI void __stdcall mb_reinit(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.obj/include/clayer/network.h |
---|
46,11 → 46,9 |
}; |
#pragma pack(pop) |
int networklib_init(); |
DLLAPI int __stdcall inet_addr(const char* hostname); |
DLLAPI char* __stdcall inet_ntoa(int ip_addr); |
DLLAPI int __stdcall getaddrinfo(const char* hostname, const char* servname, const struct addrinfo* hints, struct addrinfo** res); |
DLLAPI void __stdcall freeaddrinfo(struct addrinfo* ai); |
extern int __stdcall (*inet_addr)(const char* hostname); |
extern char* __stdcall (*inet_ntoa)(int ip_addr); |
extern int __stdcall (*getaddrinfo)(const char* hostname, const char* servname, const struct addrinfo* hints, struct addrinfo** res); |
extern void __stdcall (*freeaddrinfo)(struct addrinfo* ai); |
#endif |
/programs/develop/ktcc/trunk/libc.obj/include/clayer/rasterworks.h |
---|
3,11 → 3,9 |
#include <stddef.h> |
int kolibri_rasterworks_init(void); |
DLLAPI void __stdcall drawText(void *canvas, int x, int y, const char *string, int charQuantity, int fontColor, int params); |
DLLAPI int __stdcall countUTF8Z(const char *string, int byteQuantity) __asm__("cntUTF-8"); |
DLLAPI int __stdcall charsFit(int areaWidth, int charHeight); |
DLLAPI int __stdcall strWidth(int charQuantity, int charHeight); |
extern void __stdcall (*drawText)(void *canvas, int x, int y, const char *string, int charQuantity, int fontColor, int params); |
extern int __stdcall (*countUTF8Z)(const char *string, int byteQuantity) __asm__("cntUTF-8"); |
extern int __stdcall (*charsFit)(int areaWidth, int charHeight); |
extern int __stdcall (*strWidth)(int charQuantity, int charHeight); |
#endif /* KOLIBRI_RASTERWORKS_H */ |