/programs/develop/ktcc/trunk/libc.obj/include/clayer/boxlib.h |
---|
3,10 → 3,12 |
#ifndef KOLIBRI_BOXLIB_H |
#define KOLIBRI_BOXLIB_H |
#include "sys/ksys.h" |
#include <stdint.h> |
#include <stddef.h> |
typedef unsigned color_t; |
extern int kolibri_boxlib_init(void); |
/* flags meaning */ |
#define ed_figure_only 0b1000000000000000 // одни символы |
#define ed_always_focus 0b100000000000000 // всегда с курсором (фокусом) |
66,10 → 68,10 |
uint32_t ar_offset; |
} __attribute__ ((__packed__)) scrollbar; |
extern void (*scrollbar_h_draw __attribute__((__stdcall__)))(scrollbar*); |
extern void (*scrollbar_h_mouse __attribute__((__stdcall__)))(scrollbar*); |
extern void (*scrollbar_v_draw __attribute__((__stdcall__)))(scrollbar*); |
extern void (*scrollbar_v_mouse __attribute__((__stdcall__)))(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*); |
// CHECKBOX |
typedef struct { |
86,9 → 88,9 |
unsigned int size_of_str; |
}check_box; |
extern void (*check_box_draw2 __attribute__((__stdcall__)))(check_box *); |
extern void (*check_box_mouse2 __attribute__((__stdcall__)))(check_box *); |
extern void (*init_checkbox2 __attribute__((__stdcall__)))(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 *); |
// DBUTTON |
typedef struct { |
108,8 → 110,8 |
uint32_t click; // clicked - 1, zero it after tested |
} pict_button; |
extern void (*dynamic_button_draw __attribute__((__stdcall__)))(pict_button *); |
extern void (*dynamic_button_mouse __attribute__((__stdcall__)))(pict_button *); |
extern void __stdcall (*dynamic_button_draw)(pict_button *); |
extern void __stdcall (*dynamic_button_mouse)(pict_button *); |
// EDITBOX |
141,11 → 143,21 |
}edit_box; |
#pragma pack(pop) |
extern void (*edit_box_draw __attribute__((__stdcall__)))(edit_box *); |
extern void edit_box_key (edit_box *, unsigned int key_val)__attribute__((__stdcall__)); |
extern void (*edit_box_mouse __attribute__((__stdcall__)))(edit_box *); |
extern void (*edit_box_set_text __attribute__((__stdcall__)))(edit_box *, char *); |
extern void __stdcall (*edit_box_draw)(edit_box *) __asm__("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 *); |
void edit_box_key_safe(edit_box *e, ksys_oskey_t ch) { |
int a=3; |
asm_inline ( |
"pushl %2 \n\t" |
"call *%1 \n\t" |
::"a"(ch.val), "m"(edit_box_key), "m"(e) |
:"memory" |
); |
} |
// FRAME |
typedef struct { |
uint32_t type; |
162,7 → 174,7 |
color_t font_bg_color; |
}frame; |
extern void (*frame_draw)(frame *); |
extern void __stdcall (*frame_draw)(frame *); |
// MENUBAR |
typedef struct |
203,9 → 215,9 |
uint32_t get_mouse_flag; |
} menubar; |
extern void (*menu_bar_draw)(menubar *); |
extern void (*menu_bar_mouse)(menubar *); |
extern void (*menu_bar_activate)(menubar *); |
extern void __stdcall (*menu_bar_draw)(menubar *); |
extern void __stdcall (*menu_bar_mouse)(menubar *); |
extern void __stdcall (*menu_bar_activate)(menubar *); |
// OPTIONBOX |
typedef struct option_box_t { |
222,8 → 234,8 |
uint32_t flags; |
} __attribute__ ((__packed__)) option_box; |
extern void (*option_box_draw __attribute__((__stdcall__)))(option_box **); |
extern void (*option_box_mouse __attribute__((__stdcall__)))(option_box **); |
extern void __stdcall (*option_box_draw)(option_box **); |
extern void __stdcall (*option_box_mouse)(option_box **); |
// PATHSHOW |
typedef struct { |
240,8 → 252,8 |
uint32_t temp_text_length; |
} __attribute__ ((__packed__)) pathview; |
extern void (*path_show_prepare __attribute__((__stdcall__)))(pathview *); |
extern void (*path_show_draw __attribute__((__stdcall__)))(pathview *); |
extern void __stdcall (*path_show_prepare)(pathview *); |
extern void __stdcall (*path_show_draw)(pathview *); |
// PROGRESSBAR |
typedef struct { |
258,8 → 270,7 |
unsigned int frame_color; |
} progressbar; |
extern void (*progressbar_draw __attribute__((__stdcall__)))(progressbar *); |
extern void (*progressbar_progress __attribute__((__stdcall__)))(progressbar *); |
extern void __stdcall (*progressbar_draw)(progressbar *); |
extern void __stdcall (*progressbar_progress)(progressbar *); |
#endif /* KOLIBRI_BOXLIB_H */ |
/programs/develop/ktcc/trunk/libc.obj/include/clayer/buf2d.h |
---|
2,12 → 2,9 |
#define KOLIBRI_BUF2D_H |
#include <stdint.h> |
/*ToDo |
* voxel function |
*/ |
#include <sys/ksys.h> |
#include <stddef.h> |
extern int kolibri_buf2d_init(void); |
typedef struct { |
unsigned int *buf_pointer; |
uint16_t left; |
33,12 → 30,12 |
BUF2D_OPT_CROP_RIGHT = 8 |
}; |
extern void (*buf2d_create_asm __attribute__((__stdcall__)))(buf2d_struct *); |
extern void (*buf2d_curve_bezier_asm __attribute__((__stdcall__)))(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 *)malloc(sizeof(buf2d_struct)); |
buf2d_struct *new_buf2d_struct = (buf2d_struct *)_ksys_alloc(sizeof(buf2d_struct)); |
new_buf2d_struct -> left = tlx; |
new_buf2d_struct -> top = tly; |
new_buf2d_struct -> width = sizex; |
54,30 → 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 (*buf2d_draw __attribute__((__stdcall__)))(buf2d_struct *); |
extern void (*buf2d_clear __attribute__((__stdcall__)))(buf2d_struct *, unsigned int); |
extern void (*buf2d_delete __attribute__((__stdcall__)))(buf2d_struct *); |
extern void (*buf2d_rotate __attribute__((__stdcall__)))(buf2d_struct *, unsigned int); |
extern void (*buf2d_resize __attribute__((__stdcall__)))(buf2d_struct *, unsigned int, unsigned int, unsigned int); |
extern void (*buf2d_line __attribute__((__stdcall__)))(buf2d_struct *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int); |
extern void (*buf2d_line_sm __attribute__((__stdcall__)))(buf2d_struct *, unsigned int, unsigned int, unsigned int, unsigned int); |
extern void (*buf2d_rect_by_size __attribute__((__stdcall__)))(buf2d_struct *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int); |
extern void (*buf2d_filled_rect_by_size __attribute__((__stdcall__)))(buf2d_struct *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int); |
extern void (*buf2d_circle __attribute__((__stdcall__)))(buf2d_struct *, unsigned int, unsigned int, unsigned int, unsigned int); |
extern void (*buf2d_img_hdiv2 __attribute__((__stdcall__)))(buf2d_struct *); |
extern void (*buf2d_img_wdiv2 __attribute__((__stdcall__)))(buf2d_struct *); |
extern void (*buf2d_conv_24_to_8 __attribute__((__stdcall__)))(buf2d_struct *, unsigned int); |
extern void (*buf2d_conv_24_to_32 __attribute__((__stdcall__)))(buf2d_struct *, unsigned int); |
extern void (*buf2d_bit_blt_transp __attribute__((__stdcall__)))(buf2d_struct *, unsigned int, unsigned int, buf2d_struct *); |
extern void (*buf2d_bit_blt_alpha __attribute__((__stdcall__)))(buf2d_struct *, unsigned int, unsigned int, buf2d_struct *); |
extern void (*buf2d_convert_text_matrix __attribute__((__stdcall__)))(buf2d_struct *); |
extern void (*buf2d_draw_text __attribute__((__stdcall__)))(buf2d_struct *, buf2d_struct *, const char *, unsigned int, unsigned int); |
extern void (*buf2d_crop_color __attribute__((__stdcall__)))(buf2d_struct *, unsigned int, unsigned int); |
extern void (*buf2d_offset_h __attribute__((__stdcall__)))(buf2d_struct *, unsigned int, unsigned int, unsigned int); |
extern void (*buf2d_flood_fill __attribute__((__stdcall__)))(buf2d_struct *, unsigned int, unsigned int, unsigned int, unsigned int); |
extern void (*buf2d_set_pixel __attribute__((__stdcall__)))(buf2d_struct *, unsigned int, unsigned int, unsigned int); |
extern unsigned int (*buf2d_get_pixel __attribute__((__stdcall__)))(buf2d_struct *, unsigned int, unsigned int); |
extern void (*buf2d_flip_h __attribute__((__stdcall__)))(buf2d_struct *); |
extern void (*buf2d_flip_v __attribute__((__stdcall__)))(buf2d_struct *); |
extern void (*buf2d_filter_dither __attribute__((__stdcall__)))(buf2d_struct *, unsigned int); |
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); |
#endif /* KOLIBRI_BUF2D_H */ |
/programs/develop/ktcc/trunk/libc.obj/include/clayer/dialog.h |
---|
2,6 → 2,7 |
#define KOLIBRI_DIALOG_H |
#include <stdlib.h> |
#define NOT_SUCCESS 0 |
#define SUCCESS 1 |
115,12 → 116,10 |
return new_colordialog; |
} |
extern void kolibri_dialog_init(); |
extern void __stdcall (*OpenDialog_init)(open_dialog *); |
extern void __stdcall (*OpenDialog_start)(open_dialog *); |
extern void (*OpenDialog_init __attribute__((__stdcall__)))(open_dialog *); |
extern void (*OpenDialog_start __attribute__((__stdcall__)))(open_dialog *); |
extern void __stdcall (*ColorDialog_init)(color_dialog *); |
extern void __stdcall (*ColorDialog_start)(color_dialog *); |
extern void (*ColorDialog_init __attribute__((__stdcall__)))(color_dialog *); |
extern void (*ColorDialog_start __attribute__((__stdcall__)))(color_dialog *); |
#endif |
/programs/develop/ktcc/trunk/libc.obj/include/clayer/gb.h |
---|
1,3 → 1,5 |
#ifndef KOLIBRI_GB_H |
#define KOLIBRI_GB_H |
#pragma pack(push, 1) |
typedef struct |
17,3 → 19,5 |
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); |
#endif // KOLIBRI_GB_H |
/programs/develop/ktcc/trunk/libc.obj/include/clayer/http.h |
---|
5,11 → 5,10 |
Adapted for TCC's dynamic API by Magomed Kostoev, 2020 |
*/ |
#ifndef _HTTP_H_ |
#define _HTTP_H_ |
#ifndef KOLIBRI_HTTP_H |
#define KOLIBRI_HTTP_H |
#define cdecl __attribute__ ((cdecl)) |
#define stdcall __attribute__ ((stdcall)) |
#include <stddef.h> |
// Bitflags for http_msg.flags |
// status |
80,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); |
extern http_msg * __stdcall (*http_get)(const char *url, http_msg *identifier, unsigned flags, const char *add_header); |
/* |
url = pointer to ASCIIZ URL |
91,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); |
extern http_msg * __stdcall (*http_head)(const char *url, http_msg *identifier, unsigned flags, const char *add_header); |
/* |
url = pointer to ASCIIZ URL |
106,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, |
extern http_msg * __stdcall (*http_post)(const char *url, http_msg *identifier, unsigned flags, const char *add_header, |
const char *content_type, unsigned content_length); |
/* |
128,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); |
extern int __stdcall (*http_receive)(http_msg *identifier); |
/* |
identifier = identifier which one of the previous functions returned |
137,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); |
extern 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); |
extern int __stdcall (*http_free)(http_msg *identifier); |
/* |
Free unused data |
*/ |
150,4 → 149,4 |
#define http_long_receive(x) while(http_receive(x)){}; |
#endif // _HTTP_H_ |
#endif // KOLIBRI_HTTP_H |
/programs/develop/ktcc/trunk/libc.obj/include/clayer/inputbox.h |
---|
5,13 → 5,12 |
Adapted for TCC's dynamic API by Magomed Kostoev, 2020 |
*/ |
#ifndef __KOS__INPUTBOX__H________ |
#define __KOS__INPUTBOX__H________ |
#ifndef KOLIBRI_INPUTBOX_H |
#define KOLIBRI_INPUTBOX_H |
#define cdecl __attribute__ ((cdecl)) |
#define stdcall __attribute__ ((stdcall)) |
#include <stddef.h> |
extern unsigned stdcall (*InputBox)(void* Buffer, char* Caption, char* Prompt, char* Default, |
extern unsigned __stdcall (*InputBox)(void* Buffer, char* Caption, char* Prompt, char* Default, |
unsigned long Flags, unsigned long BufferSize, void* RedrawProc); |
#endif // __KOS__INPUTBOX__H________ |
#endif // KOLIBRI_INPUTBOX_H |
/programs/develop/ktcc/trunk/libc.obj/include/clayer/libimg.h |
---|
6,10 → 6,6 |
#include <stddef.h> |
#include <stdbool.h> |
extern int kolibri_libimg_init(void); |
#define _stdcall __attribute__((__stdcall__)) |
//list of format id's |
#define LIBIMG_FORMAT_BMP 1 |
#define LIBIMG_FORMAT_ICO 2 |
99,23 → 95,23 |
#define ROTATE_90_CCW ROTATE_270_CW |
#define ROTATE_270_CCW ROTATE_90_CW |
extern Image* (*img_decode _stdcall)(void* file_data, uint32_t size, uint32_t b_color); |
extern Image* (*img_encode _stdcall)(Image* img, uint32_t length, uint32_t option); |
extern Image* (*img_create _stdcall)(uint32_t width, uint32_t height, uint32_t type); |
extern void (*img_to_rgb2 _stdcall)(Image* img, void *rgb_data); |
extern Image* (*img_to_rgb _stdcall)(Image* img); |
extern bool (*img_flip _stdcall)(Image* img, uint32_t flip); |
extern bool (*img_flip_layer _stdcall)(Image *img, uint32_t flip); |
extern bool (*img_rotate _stdcall)(Image *img, uint32_t rotate); |
extern bool (*img_rotate_layer _stdcall)(Image* data, uint32_t rotate); |
extern void (*img_draw _stdcall)(Image *img, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t xoff, uint32_t yoff); |
extern int32_t (*img_count _stdcall)(Image *img); |
extern bool (*img_destroy _stdcall)(Image *img); |
extern bool (*img_destroy_layer _stdcall)(Image* img); |
extern Image* (*img_blend _stdcall)(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* (*img_convert _stdcall)(Image *src, Image *dst, uint32_t dst_type, uint32_t, uint32_t); |
extern Image* (*img_resize_data _stdcall)(Image *src, uint32_t width, uint32_t height); |
extern Image* (*img_scale _stdcall)(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); |
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); |
void img_fill_color(Image* img, uint32_t width, uint32_t height, uint32_t color){ |
for (uint32_t i = 0; i < width*height; i++) { |
/programs/develop/ktcc/trunk/libc.obj/include/clayer/msgbox.h |
---|
1,11 → 1,11 |
#ifndef KOLIBRI_MSGBOX_H |
#define KOLIBRI_MSGBOX_H |
#include <stdarg.h> |
#include <stddef.h> |
#include <stdlib.h> |
#include <string.h> |
typedef struct { |
uint8_t retval; // 0 - win closed, 1 to n - button num, also default button on start |
uint8_t reserv; |
16,9 → 16,9 |
typedef void (*msgbox_callback)(void); |
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 |
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 |
static inline msgbox* kolibri_new_msgbox(char* title, char* text, int def_but, ...) |
/// text can be multilined by code 13 = "\r" |
48,8 → 48,8 |
static inline void kolibri_start_msgbox(msgbox* box, msgbox_callback cb[]) |
{ |
(*msgbox_create)(box, &box->top_stack); |
if (cb) (*msgbox_setfunctions)(cb); |
mb_create(box, &box->top_stack); |
if (cb) mb_setfunctions(cb); |
} |
#endif |
/programs/develop/ktcc/trunk/libc.obj/include/clayer/network.h |
---|
1,11 → 1,9 |
#ifndef __NETWORK_H |
#define __NETWORK_H |
#ifndef KOLIBRI_NETWORK_H |
#define KOLIBRI_NETWORK_H |
#include <sys/socket.h> |
#include <sys/ksys.h> |
#define stdcall __attribute__ ((stdcall)) |
#define EAI_ADDRFAMILY 1 |
#define EAI_AGAIN 2 |
#define EAI_BADFLAGS 3 |
48,10 → 46,9 |
}; |
#pragma pack(pop) |
extern int networklib_init (); |
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); |
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 |
---|
1,11 → 1,11 |
#ifndef KOLIBRI_RASTERWORKS_H |
#define KOLIBRI_RASTERWORKS_H |
//extern int kolibri_rasterworks_init(void); |
#include <stddef.h> |
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); |
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 */ |
#endif /* KOLIBRI_RASTERWORKS_H */ |