Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6589 → Rev 6588

/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;