Subversion Repositories Kolibri OS

Rev

Rev 6391 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6391 Rev 6396
Line 35... Line 35...
35
  enum KOLIBRI_GUI_ELEMENT_TYPE type;
35
  enum KOLIBRI_GUI_ELEMENT_TYPE type;
36
  void *element;
36
  void *element;
37
  struct kolibri_window_element *next, *prev;
37
  struct kolibri_window_element *next, *prev;
38
};
38
};
Line -... Line 39...
-
 
39
 
-
 
40
 
-
 
41
typedef void (*cb_elem_boxlib)(void *) __attribute__((__stdcall__));
39
 
42
 
40
/* Generic structure for supporting functions on various elements of Kolibri's GUI */
43
/* Generic structure for supporting functions on various elements of Kolibri's GUI */
41
struct kolibri_element_operations {
44
struct kolibri_element_operations {
42
  void (*redraw_fn)(void *);
45
 	cb_elem_boxlib 	redraw_fn;
43
  void (*mouse_fn)(void *);
46
 	cb_elem_boxlib 	mouse_fn;
44
  void (*key_fn)(void *);
47
 	cb_elem_boxlib 	key_fn;
Line 45... Line 48...
45
};
48
};
46
 
49
 
47
/* Structure for a GUI Window on Kolibri. It also contains all the elements drawn in window */
50
/* Structure for a GUI Window on Kolibri. It also contains all the elements drawn in window */
Line 63... Line 66...
63
struct kolibri_element_operations kolibri_gui_op_table[KOLIBRI_NUM_GUI_ELEMENTS];
66
struct kolibri_element_operations kolibri_gui_op_table[KOLIBRI_NUM_GUI_ELEMENTS];
Line 64... Line 67...
64
 
67
 
65
void kolibri_init_gui_op_table(void)
68
void kolibri_init_gui_op_table(void)
66
{
69
{
67
/* Setting up functions for edit box GUI elements*/
70
/* Setting up functions for edit box GUI elements*/
68
kolibri_gui_op_table[KOLIBRI_EDIT_BOX].redraw_fn = edit_box_draw;
71
kolibri_gui_op_table[KOLIBRI_EDIT_BOX].redraw_fn = (cb_elem_boxlib)edit_box_draw;
69
kolibri_gui_op_table[KOLIBRI_EDIT_BOX].mouse_fn = edit_box_mouse;
72
kolibri_gui_op_table[KOLIBRI_EDIT_BOX].mouse_fn = (cb_elem_boxlib)edit_box_mouse;
Line 70... Line 73...
70
kolibri_gui_op_table[KOLIBRI_EDIT_BOX].key_fn = editbox_key;
73
kolibri_gui_op_table[KOLIBRI_EDIT_BOX].key_fn = (cb_elem_boxlib)editbox_key;
71
 
74
 
72
/* Setting up functions for check box GUI elements*/
75
/* Setting up functions for check box GUI elements*/
73
kolibri_gui_op_table[KOLIBRI_CHECK_BOX].redraw_fn = check_box_draw2;
76
kolibri_gui_op_table[KOLIBRI_CHECK_BOX].redraw_fn = (cb_elem_boxlib)check_box_draw2;
Line 74... Line 77...
74
kolibri_gui_op_table[KOLIBRI_CHECK_BOX].mouse_fn = check_box_mouse2;
77
kolibri_gui_op_table[KOLIBRI_CHECK_BOX].mouse_fn = (cb_elem_boxlib)check_box_mouse2;
75
kolibri_gui_op_table[KOLIBRI_CHECK_BOX].key_fn = NULL;
78
kolibri_gui_op_table[KOLIBRI_CHECK_BOX].key_fn = NULL;
76
 
79
 
77
/* Setting up functions for Kolibri Buttons ( SysFunc 8 )*/
80
/* Setting up functions for Kolibri Buttons ( SysFunc 8 )*/
-
 
81
kolibri_gui_op_table[KOLIBRI_BUTTON].redraw_fn = (cb_elem_boxlib)draw_button;
78
kolibri_gui_op_table[KOLIBRI_BUTTON].redraw_fn = draw_button;
82
kolibri_gui_op_table[KOLIBRI_BUTTON].mouse_fn = NULL;
Line 79... Line 83...
79
kolibri_gui_op_table[KOLIBRI_BUTTON].mouse_fn = NULL;
83
kolibri_gui_op_table[KOLIBRI_BUTTON].key_fn = NULL;
80
kolibri_gui_op_table[KOLIBRI_BUTTON].key_fn = NULL;
84