Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6478 → Rev 6479

/contrib/C_Layer/INCLUDE/kolibri_gui_elements.h
1,23 → 1,14
#ifndef KOLIBRI_GUI_ELEMENTS_H
#define KOLIBRI_GUI_ELEMENTS_H
 
/* GUI Elements being used */
#include "kolibri_editbox.h"
#include "kolibri_checkbox.h"
#include "kolibri_button.h"
#include "kolibri_progressbar.h"
#include "kolibri_frame.h"
#include "kolibri_scrollbar.h"
#include "kolibri_statictext.h"
#include "kolibri_colors.h"
 
#define X_Y(x,y) (((x)<<16)|(y))
 
/* enum KOLIBRI_GUI_ELEMENT_TYPE contains all available GUI items from box_lib */
/* More elements can be added from other libraries as required */
enum KOLIBRI_GUI_ELEMENT_TYPE {
KOLIBRI_EDIT_BOX,
KOLIBRI_CHECK_BOX,
KOLIBRI_RADIO_BUTTON,
KOLIBRI_OPTIONGROUP,
KOLIBRI_SCROLL_BAR_H,
KOLIBRI_SCROLL_BAR_V,
KOLIBRI_DYNAMIC_BUTTON,
68,6 → 59,23
}kolibri_window;
 
/*---------------------End of Structure and enum definitions---------------*/
 
void kolibri_window_add_element(kolibri_window *some_window, enum KOLIBRI_GUI_ELEMENT_TYPE element_type, void *some_gui_element); // forward declaration
 
/* GUI Elements being used */
#include "kolibri_editbox.h"
#include "kolibri_checkbox.h"
#include "kolibri_button.h"
#include "kolibri_progressbar.h"
#include "kolibri_frame.h"
#include "kolibri_scrollbar.h"
#include "kolibri_statictext.h"
#include "kolibri_optionbox.h"
 
#define X_Y(x,y) (((x)<<16)|(y))
 
 
 
/*---------------------Define various functions for initializing GUI-------*/
 
/* Master table containing operations for various GUI elements in one place */
94,7 → 102,6
kolibri_gui_op_table[KOLIBRI_PROGRESS_BAR].redraw_fn = (cb_elem_boxlib)progressbar_draw;
kolibri_gui_op_table[KOLIBRI_PROGRESS_BAR].mouse_fn = NULL;
kolibri_gui_op_table[KOLIBRI_PROGRESS_BAR].key_fn = NULL;
debug_board_printf("PROGRESS (%x,%x,%x)\n", progressbar_draw,0,0);
 
/* Setting up functions for frame GUI elements*/
kolibri_gui_op_table[KOLIBRI_FRAME].redraw_fn = (cb_elem_boxlib)frame_draw;
101,19 → 108,14
kolibri_gui_op_table[KOLIBRI_FRAME].mouse_fn = NULL;
kolibri_gui_op_table[KOLIBRI_FRAME].key_fn = NULL;
 
debug_board_printf("FRAME (%x,%x,%x)\n", frame_draw,0,0);
 
 
/* scrollbars */
kolibri_gui_op_table[KOLIBRI_SCROLL_BAR_H].redraw_fn = (cb_elem_boxlib)scrollbar_h_draw;
kolibri_gui_op_table[KOLIBRI_SCROLL_BAR_H].mouse_fn = (cb_elem_boxlib)scrollbar_h_mouse;
kolibri_gui_op_table[KOLIBRI_SCROLL_BAR_H].key_fn = NULL;
debug_board_printf("SCROLL_H (%x,%x,%x)\n", scrollbar_h_draw,scrollbar_h_mouse,0);
 
kolibri_gui_op_table[KOLIBRI_SCROLL_BAR_V].redraw_fn = (cb_elem_boxlib)scrollbar_v_draw;
kolibri_gui_op_table[KOLIBRI_SCROLL_BAR_V].mouse_fn = (cb_elem_boxlib)scrollbar_v_mouse;
kolibri_gui_op_table[KOLIBRI_SCROLL_BAR_V].key_fn = NULL;
debug_board_printf("SCROLL_V (%x,%x,%x)\n", scrollbar_v_draw,scrollbar_v_mouse,0);
 
kolibri_gui_op_table[KOLIBRI_STATICTEXT].redraw_fn = (cb_elem_boxlib)statictext_draw;
kolibri_gui_op_table[KOLIBRI_STATICTEXT].mouse_fn = NULL;
122,7 → 124,12
kolibri_gui_op_table[KOLIBRI_STATICNUM].redraw_fn = (cb_elem_boxlib)staticnum_draw;
kolibri_gui_op_table[KOLIBRI_STATICNUM].mouse_fn = NULL;
kolibri_gui_op_table[KOLIBRI_STATICNUM].key_fn = NULL;
debug_board_printf("STATICNUM (%x,%x,%x)\n", staticnum_draw,0,0);
 
kolibri_gui_op_table[KOLIBRI_OPTIONGROUP].redraw_fn = (cb_elem_boxlib)option_box_draw;
kolibri_gui_op_table[KOLIBRI_OPTIONGROUP].mouse_fn = (cb_elem_boxlib)option_box_mouse;
kolibri_gui_op_table[KOLIBRI_OPTIONGROUP].key_fn = NULL;
 
debug_board_printf("KOLIBRI_OPTIONGROUP (%x,%x,%x)\n", option_box_draw,option_box_mouse,0);
}
 
/* Create a new main GUI window for KolibriOS */