Subversion Repositories Kolibri OS

Rev

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

Rev 8073 Rev 8250
Line 11... Line 11...
11
 
11
 
12
#define TRUE 1;
12
#define TRUE 1;
13
#define FALSE 0;
13
#define FALSE 0;
14
#define MAX_HASH_LEN 65 // Œ ªá¨¬ «ì­ ï ¤«¨­  áâப¨
14
#define MAX_HASH_LEN 65 // Œ ªá¨¬ «ì­ ï ¤«¨­  áâப¨
15
#define WINDOW_W 665
15
#define WINDOW_W 665
Line 16... Line 16...
16
#define VERSION "%s - thashview 2.2"
16
#define VERSION "%s - thashview 2.3"
17
 
17
 
Line 18... Line 18...
18
typedef unsigned char bool;
18
typedef unsigned char bool;
Line 167... Line 167...
167
void redraw_window() //¨á㥬 ®ª­®
167
void redraw_window() //¨á㥬 ®ª­®
168
{
168
{
169
    pos_t win_pos = get_mouse_pos(0); //®«ãç ¥¬ ¯®§¨æ¨î ªãàá®à  ¬ëè¨.
169
    pos_t win_pos = get_mouse_pos(0); //®«ãç ¥¬ ¯®§¨æ¨î ªãàá®à  ¬ëè¨.
170
    sprintf(title,VERSION, filename); // “áâ ­ ¢«¨¢ ¥¬ § £®«®¢®ª ®ª­ 
170
    sprintf(title,VERSION, filename); // “áâ ­ ¢«¨¢ ¥¬ § £®«®¢®ª ®ª­ 
171
    begin_draw(); // ç¨­ ¥¬ à¨á®¢ ­¨¥ ¨­â¥àä¥©á  )
171
    begin_draw(); // ç¨­ ¥¬ à¨á®¢ ­¨¥ ¨­â¥àä¥©á  )
172
    sys_create_window(win_pos.x, win_pos.y, WINDOW_W, 150, title, GREY, 0x14); // ‘®§¤ ñ¬ ®ª­®.
172
    sys_create_window(win_pos.x, win_pos.y, WINDOW_W, 150, title, sys_color_table.work_area, 0x14); // ‘®§¤ ñ¬ ®ª­®.
Line 173... Line 173...
173
 
173
 
174
    draw_bar(10, 121, 525,20, WHITE); // ‘®§¤ ñ¬ ¯àאַ㣮«ì­¨ª ¤«ï ¯®«ï ¢¢®¤ 
174
    draw_bar(10, 121, 525,20, WHITE); // ‘®§¤ ñ¬ ¯àאַ㣮«ì­¨ª ¤«ï ¯®«ï ¢¢®¤ 
175
    draw_text_sys(edit_box_buff,15, 125, 0, 0x90000000| edit_box_text_color); // ‚뢮¤¨¬ ⥪áâ ¨§ ¡ãää¥à  ¢¢®¤ 
175
    draw_text_sys(edit_box_buff,15, 125, 0, 0x90000000| edit_box_text_color); // ‚뢮¤¨¬ ⥪áâ ¨§ ¡ãää¥à  ¢¢®¤ 
Line 204... Line 204...
204
}
204
}
Line 205... Line 205...
205
 
205
 
206
 
206
 
207
void paste_to_edit_buffer()    // ‚áâ ¢¨âì ¨§ ¡ãää¥à  ®¡¬¥­ 
207
void paste_to_edit_buffer()    // ‚áâ ¢¨âì ¨§ ¡ãää¥à  ®¡¬¥­ 
-
 
208
{
-
 
209
    char *temp_buff=NULL;
208
{
210
    if(kol_clip_num()>0)
209
    char *temp_buff;
211
    {
210
    temp_buff=kol_clip_get(kol_clip_num()-1);
212
        temp_buff=kol_clip_get(kol_clip_num()-1);
211
    memset(edit_box_buff,0,MAX_HASH_LEN);
213
        memset(edit_box_buff,0,MAX_HASH_LEN);
212
    if(((int)*(temp_buff)>0) && ((int)*(temp_buff+4)==0) && ((int)*(temp_buff+8)==1))
214
        if(((int)*(temp_buff)>0) && ((int)*(temp_buff+4)==0) && ((int)*(temp_buff+8)==1))
213
    {
215
        {
214
        strncpy(edit_box_buff,temp_buff+12, MAX_HASH_LEN-1);
216
            strncpy(edit_box_buff,temp_buff+12, MAX_HASH_LEN-1);
215
        str_pos=strlen(edit_box_buff);
217
            str_pos=strlen(edit_box_buff);
216
        notify_show("'Pasted from clipboard!' -I");
-
 
217
        edit_box_text_color=BLACK;
218
            notify_show("'Pasted from clipboard!' -I");
-
 
219
            edit_box_text_color=BLACK;
-
 
220
            user_free(temp_buff);
-
 
221
        
218
    }
222
        }
Line 219... Line 223...
219
    user_free(temp_buff);
223
    }
220
}
224
}
Line 294... Line 298...
294
        }
298
        }
295
}
299
}
Line 296... Line 300...
296
 
300
 
297
void edit_box(oskey_t key)      //”ã­ªæ¨ï ॠ«¨§ãîé ï áâப㠢¢®¤ 
301
void edit_box(oskey_t key)      //”ã­ªæ¨ï ॠ«¨§ãîé ï áâப㠢¢®¤ 
298
{
302
{
299
    edit_box_text_color=BLACK;
-
 
300
 
303
    edit_box_text_color=sys_color_table.frame_area;
301
    if(key.code==CTRL_V) // …᫨ ­ ¦ â® Ctrl+V â® ¢áâ ¢¨âì ¨§ ¡ãä¥à  ®¡¬¥­ 
304
    if(key.code==CTRL_V) // …᫨ ­ ¦ â® Ctrl+V â® ¢áâ ¢¨âì ¨§ ¡ãä¥à  ®¡¬¥­ 
302
    {
305
    {
303
        paste_to_edit_buffer();
306
        paste_to_edit_buffer();
304
    }
307
    }