Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6589 → Rev 6561

/contrib/C_Layer/EXAMPLE/libguic_kolibri/editor_tree_msgbox.c
File deleted
/contrib/C_Layer/EXAMPLE/libguic_kolibri/dbutton_files.c
41,6 → 41,7
kolibri_proclib_init(); // opensave && color dialogs
kolibri_libimg_init(); // png handling
 
 
int gui_event = KOLIBRI_EVENT_REDRAW;
uint32_t pressed_button = 0;
// uint32_t mouse_button;
109,6 → 110,13
brows.folder_data = read_folderdata("/rd/1");
brows.select_panel_counter = 1; // if want to show selection
 
kolibri_handle_event_redraw(main_window);
brows.all_redraw = 1;
(*filebrowse_draw)(&brows);
 
 
//??? set_os_keyb_mode(1); // needed for keyboard use in menu
 
int extended_key = 0, act = 0;
do /* Start of main activity loop */
{
115,6 → 123,8
switch(gui_event)
{
case KOLIBRI_EVENT_REDRAW:
//???? start red
//brows.marked_file = 1;
control_minimal_window_size(430, 500);
brows.all_redraw = 1;
kolibri_handle_event_redraw(main_window);
/contrib/C_Layer/EXAMPLE/libguic_kolibri/boardmsg.c
38,7 → 38,7
edit_box *textbox = kolibri_new_edit_box(20, 30, 40, &editbox_interlock);
edit_box *textbox2 = kolibri_new_edit_box(20, 50, 30, &editbox_interlock);
kolibri_button *button = kolibri_new_button(310, 30, 24, 14, 0x21, kolibri_color_table.color_work_button);
frame *fr = kolibri_new_frame(X_Y(12, 350), X_Y(5, 70), 0x00FCFCFC, 0x00DCDCDC, "Frame Title", 0, kolibri_color_table.color_work_text, kolibri_color_table.color_work_area, 0);
frame *fr = kolibri_new_frame(X_Y(12, 350), X_Y(5, 70), 0x00FCFCFC, 0x00DCDCDC, "Frame Title", 0, kolibri_color_table.color_work_text, kolibri_color_table.color_work_area);
 
kolibri_window_add_element(main_window, KOLIBRI_EDIT_BOX, textbox);
kolibri_window_add_element(main_window, KOLIBRI_EDIT_BOX, textbox2);
/contrib/C_Layer/INCLUDE/kolibri_editor.h
File deleted
/contrib/C_Layer/INCLUDE/kolibri_treelist.h
File deleted
/contrib/C_Layer/INCLUDE/kolibri_msgbox.h
File deleted
/contrib/C_Layer/INCLUDE/kolibri_filebrowse.h
112,7 → 112,7
uint32_t select_flag; // widget have focus, set auto on mouseclick, but need to reset before mouse()
color_t background_color; // self explained, 0xffffff
color_t select_color; // self explained, 0xbbddff
color_t select_text_color; // self explained - have a bug - never really used
color_t select_text_color; // self explained - have a bug - newer used
color_t text_color; // self explained
color_t reduct_text_color; // 0xff0000 - spec color for cutted filenames
color_t marked_text_color; // not used
216,7 → 216,12
0x000000, 0xbbddff, kolibri_color_table.color_work_text, kolibri_color_table.color_work_area, 0xff0000);
}
*/
 
/*
inline frame* kolibri_new_frame_def(uint32_t x_w, uint32_t y_h, char *text)
{
return kolibri_new_frame(x_w, y_h, 0x00FCFCFC, 0x00DCDCDC, text, TOP, kolibri_color_table.color_work_text, kolibri_color_table.color_work_area);
}
*/
inline void gui_add_filebrowser(kolibri_window *wnd, filebrowser* f)
{
kolibri_window_add_element(wnd, KOLIBRI_FILEBROWSE, f);
/contrib/C_Layer/INCLUDE/kolibri_gui_elements.h
25,7 → 25,6
KOLIBRI_D_BUTTON,
KOLIBRI_PATHSHOW,
KOLIBRI_FILEBROWSE,
KOLIBRI_EDITOR,
 
/* Add elements above this element in order to let KOLIBRI_NUM_GUI_ELEMENTS */
/* stay at correct value */
80,9 → 79,9
#include "kolibri_scrollbar.h"
#include "kolibri_statictext.h"
#include "kolibri_filebrowse.h"
#include "kolibri_editor.h"
 
 
 
/*---------------------Define various functions for initializing GUI-------*/
 
/* Master table containing operations for various GUI elements in one place */
151,11 → 150,7
kolibri_gui_op_table[KOLIBRI_FILEBROWSE].redraw_fn = (cb_elem_boxlib)filebrowse_draw;
kolibri_gui_op_table[KOLIBRI_FILEBROWSE].mouse_fn = (cb_elem_boxlib)filebrowse_mouse;
kolibri_gui_op_table[KOLIBRI_FILEBROWSE].key_fn = (cb_elem_boxlib)filebrowse_key;
 
kolibri_gui_op_table[KOLIBRI_EDITOR].redraw_fn = (cb_elem_boxlib)ted_draw;
kolibri_gui_op_table[KOLIBRI_EDITOR].mouse_fn = (cb_elem_boxlib)ted_mouse;
kolibri_gui_op_table[KOLIBRI_EDITOR].key_fn = (cb_elem_boxlib)editor_key;
debug_board_printf("KOLIBRI_EDITOR (%x,%x,%x)\n", ted_draw, ted_mouse, editor_key);
debug_board_printf("KOLIBRI_FILEBROWSE (%x,%x,%x)\n", filebrowse_draw, filebrowse_mouse, filebrowse_key);
}
 
/* Create a new main GUI window for KolibriOS */
/contrib/C_Layer/INCLUDE/kolibri_colordialog.h
4,7 → 4,7
char cd_com_area_name[] = "FFFFFFFF_color_dialog";
char cd_start_path[] = "/rd/1/colrdial";
 
typedef struct __attribute__ ((__packed__)) {
typedef struct {
unsigned int type;
unsigned int procinfo;
unsigned int com_area_name;
/contrib/C_Layer/INCLUDE/kolibri_opendialog.h
11,12 → 11,12
SELECT
};
 
typedef struct __attribute__ ((__packed__)) {
typedef struct {
unsigned int size;
unsigned char end;
}od_filter;
 
typedef struct __attribute__ ((__packed__)) {
typedef struct {
unsigned int mode;
char* procinfo;
char* com_area_name;
/contrib/C_Layer/INCLUDE/kolibri_pathshow.h
1,7 → 1,7
#ifndef KOLIBRI_PATHSHOW_H
#define KOLIBRI_PATHSHOW_H
 
typedef struct __attribute__ ((__packed__)) {
typedef struct {
uint32_t type;
uint32_t x_y;
uint16_t font_size_x; // 6 - for font 0, 8 - for font 1
/contrib/C_Layer/INCLUDE/kolibri_kmenu.h
22,7 → 22,7
};
} t_font;
 
typedef struct __attribute__ ((__packed__)) {
typedef struct {
uint16_t left, top, right, bottom;
} t_rect;
 
/contrib/C_Layer/INCLUDE/kolibri_buf2d.h
7,7 → 7,7
 
extern int kolibri_buf2d_init(void);
 
typedef struct __attribute__ ((__packed__)) {
typedef struct {
unsigned int *buf_pointer;
uint16_t left;
uint16_t top;
/contrib/C_Layer/INCLUDE/kolibri_scrollbar.h
1,7 → 1,7
#ifndef KOLIBRI_SCROLLBAR_H
#define KOLIBRI_SCROLLBAR_H
 
typedef struct __attribute__ ((__packed__)) {
typedef struct {
// uint16_t xsize;
// uint16_t xpos;
// uint16_t ysize;
9,7 → 9,7
uint32_t x_w;
uint32_t y_h;
uint32_t btn_height;
uint32_t type; // type 1 - stylish frame, type 2 - ?, type 0 - ?
uint32_t type;
uint32_t max_area;
uint32_t cur_area;
uint32_t position;
/contrib/C_Layer/INCLUDE/kolibri_frame.h
1,27 → 1,11
#ifndef KOLIBRI_FRAME_H
#define KOLIBRI_FRAME_H
 
enum fr_text_position_t {
FR_TOP,
FR_BOTTON
enum {
TOP,
BOTTON
};
 
/*
; FR_FLAGS = [x][yyy][z]
; z - Caption
; yyy - BorderStyle
; x - BackStyle
*/
enum fr_flags_t {
FR_CAPTION = 1, // if text != null set auto
FR_DOUBLE = 0, // default
FR_RAISED = 2,
FR_SUNKEN = 4,
FR_ETCHED = 6,
FR_RINGED = 8,
FR_FILLED = 0x10
};
 
typedef struct {
uint32_t type;
uint32_t x_w;
28,7 → 12,7
uint32_t y_h;
color_t ext_col;
color_t int_col;
uint32_t flags;
uint32_t draw_text_flag;
char *text_pointer;
uint32_t text_position;
uint32_t font_number;
37,8 → 21,7
color_t font_bg_color;
}frame;
 
inline frame* kolibri_frame(frame* f, uint32_t x_w, uint32_t y_h, color_t ext_col, color_t int_col, char *text, enum fr_text_position_t text_position,
color_t font_color, color_t font_bgcolor, enum fr_flags_t flags)
inline frame* kolibri_frame(frame* f, uint32_t x_w, uint32_t y_h, color_t ext_col, color_t int_col, char *text, uint32_t text_position, color_t font_color, color_t font_bgcolor)
{
f->type = 0;
f->x_w = x_w;
45,8 → 28,7
f->y_h = y_h;
f->ext_col = ext_col;
f->int_col = int_col;
f->flags = flags;
if (text) f->flags |= FR_CAPTION;
f->draw_text_flag = text != NULL;
f->text_pointer = text;
f->text_position = text_position;
f->font_number = 0; // 0 == font 6x9, 1==8x16
54,25 → 36,23
f->font_color = font_color | 0x80000000;
f->font_bg_color = font_bgcolor;
 
 
return f;
}
 
inline frame* kolibri_new_frame(uint32_t x_w, uint32_t y_h, color_t ext_col, color_t int_col, char *text, enum fr_text_position_t text_position,
color_t font_color, color_t font_bgcolor, enum fr_flags_t flags)
inline frame* kolibri_new_frame(uint32_t x_w, uint32_t y_h, color_t ext_col, color_t int_col, char *text, uint32_t text_position, color_t font_color, color_t font_bgcolor)
{
frame *new_frame = (frame *)malloc(sizeof(frame));
return kolibri_frame(new_frame, x_w, y_h, ext_col, int_col, text, text_position, font_color, font_bgcolor, flags);
return kolibri_frame(new_frame, x_w, y_h, ext_col, int_col, text, text_position, font_color, font_bgcolor);
}
 
inline frame* kolibri_frame_def(frame* f, uint32_t x_w, uint32_t y_h, char *text)
{
return kolibri_frame(f, x_w, y_h, 0x00FCFCFC, 0x00DCDCDC, text, FR_TOP, kolibri_color_table.color_work_text, kolibri_color_table.color_work_area, 0);
return kolibri_frame(f, x_w, y_h, 0x00FCFCFC, 0x00DCDCDC, text, TOP, kolibri_color_table.color_work_text, kolibri_color_table.color_work_area);
}
 
inline frame* kolibri_new_frame_def(uint32_t x_w, uint32_t y_h, char *text)
{
return kolibri_new_frame(x_w, y_h, 0x00FCFCFC, 0x00DCDCDC, text, FR_TOP, kolibri_color_table.color_work_text, kolibri_color_table.color_work_area, 0);
return kolibri_new_frame(x_w, y_h, 0x00FCFCFC, 0x00DCDCDC, text, TOP, kolibri_color_table.color_work_text, kolibri_color_table.color_work_area);
}
 
inline void gui_add_frame(kolibri_window *wnd, frame* f)
/contrib/C_Layer/INCLUDE/kolibri_optionbox.h
1,7 → 1,7
#ifndef KOLIBRI_OPTIONBOX_H
#define KOLIBRI_OPTIONBOX_H
 
typedef struct __attribute__ ((__packed__)) option_box_t {
typedef struct option_box_t{
struct option_box_t **selected;
uint16_t posx;
uint16_t posy;
/contrib/C_Layer/ASM/loadmsgbox.asm
File deleted
/contrib/C_Layer/ASM/loadboxlib.asm
104,7 → 104,7
ted_is_select, 'ted_is_select' , \
ted_key, 'ted_key' , \
ted_mouse, 'ted_mouse' , \
ted_open_file, 'ted_open_file_asm' , \
ted_open_file, 'ted_open_file' , \
ted_save_file, 'ted_save_file' , \
ted_text_add, 'ted_text_add' , \
ted_but_select_word, 'ted_but_select_word' , \
156,30 → 156,3
public fb_draw_panel as '_filebrowse_draw'
public fb_mouse as '_filebrowse_mouse'
public fb_key as '_filebrowse_key'
 
public ted_but_sumb_upper as '_ted_but_sumb_upper_asm'
public ted_but_sumb_lover as '_ted_but_sumb_lover_asm'
public ted_but_convert_by_table as '_ted_but_convert_by_table_asm'
public ted_can_save as '_ted_can_save_asm'
public ted_clear as '_ted_clear_asm'
public ted_delete as '_ted_delete_asm'
public ted_draw as '_ted_draw'
public ted_init as '_ted_init_asm'
public ted_init_scroll_bars as '_ted_init_scroll_bars'
public ted_init_syntax_file as '_ted_init_syntax_file'
public ted_is_select as '_ted_is_select_asm'
public ted_key as '_ted_key_asm'
public ted_mouse as '_ted_mouse'
public ted_open_file as '_ted_open_file_asm'
public ted_save_file as '_ted_save_file_asm'
public ted_text_add as '_ted_text_add'
public ted_but_select_word as '_ted_but_select_word'
public ted_but_cut as '_ted_but_cut_asm'
public ted_but_copy as '_ted_but_copy'
public ted_but_paste as '_ted_but_paste'
public ted_but_undo as '_ted_but_undo_asm'
public ted_but_redo as '_ted_but_redo_asm'
public ted_but_reverse as '_ted_but_reverse_asm'
public ted_but_find_next as '_ted_but_find_next'
public ted_text_colored as 'ted_text_colored_asm'