Subversion Repositories Kolibri OS

Rev

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

Rev 6601 Rev 6612
Line 72... Line 72...
72
    tl->col_zag = title;
72
    tl->col_zag = title;
73
    tl->col_txt = txt;
73
    tl->col_txt = txt;
74
    tl->info_capt_len = info_capt_len;
74
    tl->info_capt_len = info_capt_len;
75
    tl->info_capt_offs = info_capt_offs;
75
    tl->info_capt_offs = info_capt_offs;
76
    tl->el_focus = el_focus;
76
    tl->el_focus = el_focus;
77
    tl->p_scroll = kolibri_new_scrollbar_def(X_Y(0, 16), X_Y(70, 30), 100, 30, 0);
77
    tl->p_scroll = kolibri_new_scrollbar_def(X_Y(0, 16), X_Y(0, 0), 100, 30, 0);
78
    return tl;
78
    return tl;
79
}
79
}
Line 80... Line 80...
80
 
80
 
81
static inline void gui_add_treelist(kolibri_window *wnd, treelist* tl)
81
static inline void gui_add_treelist(kolibri_window *wnd, treelist* tl)
Line 87... Line 87...
87
///ðåàêöèÿ íà ìûøü
87
///ðåàêöèÿ íà ìûøü
88
extern void (*tl_mouse)(treelist *) __attribute__((__stdcall__));
88
extern void (*tl_mouse)(treelist *) __attribute__((__stdcall__));
Line 89... Line 89...
89
 
89
 
90
///âûâîä ñïèñêà íà ýêðàí
90
///âûâîä ñïèñêà íà ýêðàí
-
 
91
extern void (*tl_draw)(treelist *) __attribute__((__stdcall__));
-
 
92
__attribute__((__stdcall__)) static inline void treelist_draw(treelist *tl)
-
 
93
{
-
 
94
    tl->p_scroll->all_redraw = 1;
-
 
95
    (*tl_draw)(tl);
-
 
96
}
Line 91... Line 97...
91
extern void (*tl_draw)(treelist *) __attribute__((__stdcall__));
97
 
92
 
98
 
Line 93... Line 99...
93
///ïåðåìåùàåì óçåë ââåðõ
99
///ïåðåìåùàåì óçåë ââåðõ
Line 118... Line 124...
118
 
124
 
Line 119... Line 125...
119
    (*tl_data_clear_asm)(tl);
125
    (*tl_data_clear_asm)(tl);
120
 
126
 
-
 
127
    __asm__ __volatile__ (
121
    __asm__ __volatile__ (
128
             "pop %%edi \n\t":::);
Line 122... Line 129...
122
             "pop %%edi \n\t":::);
129
    free(tl->p_scroll);
123
}
130
}
124
 
131
 
Line 135... Line 142...
135
             "pop %%edi \n\t":::);
142
             "pop %%edi \n\t":::);
136
}
143
}
Line 137... Line 144...
137
 
144
 
138
extern void (*tl_key_asm)(treelist *) __attribute__((__stdcall__));
145
extern void (*tl_key_asm)(treelist *) __attribute__((__stdcall__));
139
///ðåàêöèÿ íà êëàâèàòóðó
146
///ðåàêöèÿ íà êëàâèàòóðó
140
static inline void treelist_key(treelist *tl)
147
__attribute__((__stdcall__)) static inline void treelist_key(treelist *tl, oskey_t code)
141
{
148
{
142
    __asm__ __volatile__ (
149
    __asm__ __volatile__ (
143
             "push %%ebx \n\t"
150
             "push %2\n\t"
144
             "push %%edi \n\t":::);
-
 
145
 
-
 
Line 146... Line 151...
146
    (*tl_key_asm)(tl);
151
             "call *%1 \n\t"::"a"(code.val), "m"(tl_key_asm), "m"(tl):);  // indirect call with asterisk *
147
 
-
 
148
    __asm__ __volatile__ (
-
 
149
             "pop %%edi \n\t"
152
 
Line 150... Line 153...
150
             "pop %%ebx \n\t":::);
153
//    (*tl_key_asm)(tl);
151
}
154
}
152
 
155