Subversion Repositories Kolibri OS

Rev

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

Rev 4427 Rev 4428
Line 1... Line 1...
1
//Leency 2008-2013
1
//Leency 2008-2014
Line 2... Line -...
2
 
-
 
3
 
2
 
-
 
3
byte copy_to[4096];
4
byte copy_from[4096], copy_to[4096], cut_active=0;
4
byte cut_active=0;
Line 5... Line -...
5
enum {NOCUT, CUT, COPY_PASTE_END};
-
 
6
 
-
 
7
struct buffer_data
-
 
8
{
-
 
9
	dword	size;
-
 
10
	dword	type;
-
 
11
	dword	encoding;
-
 
12
	byte	buffer_data[4096];
-
 
13
};
-
 
14
 
5
enum {NOCUT, CUT, COPY_PASTE_END};
Line 15... Line -...
15
buffer_data buf_data;
-
 
16
Clipboard clipboard;
-
 
17
 
-
 
Line 18... Line 6...
18
#define WIN_W 300
6
 
19
#define WIN_H 50
7
Clipboard clipboard;
20
 
-
 
21
 
8
 
22
void Copy(dword pcth, char cut)
9
 
23
{
10
void Copy(dword pcth, char cut)
24
	strcpy(#copy_from, pcth);
11
{
25
	buf_data.size = sizeof(buffer_data);
12
	clipboard.data.size = sizeof(buffer_data);
26
	buf_data.type = 0;
13
	clipboard.data.type = 0;
27
	buf_data.encoding = 866;
14
	clipboard.data.encoding = 1;
Line 28... Line 15...
28
	strcpy(#buf_data.buffer_data, pcth);
15
	strcpy(#clipboard.data.buffer_data, pcth);
-
 
16
	clipboard.SetSlotData(sizeof(buffer_data), #clipboard.data);
-
 
17
	cut_active = cut;
29
	clipboard.SetSlotData(sizeof(buffer_data), #buf_data);
18
}
30
	cut_active = cut;
19
 
31
}
20
void copyf_Draw_Progress(dword filename) {
32
 
21
	#define WIN_W 300
33
void copyf_Draw_Progress(dword filename) {
22
	#define WIN_H 50
Line 44... Line 33...
44
 
33
 
45
 
34
 
46
void Paste()
35
void Paste()
-
 
36
{
Line 47... Line 37...
47
{
37
	char copy_rezult;
Line 48... Line 38...
48
	char copy_rezult;
38
	byte copy_from[4096];
49
	
39
	
Line 69... Line 59...
69
	}
59
	}
70
	else if (cut_active)
60
	else if (cut_active)
71
	{
61
	{
72
		strcpy(#file_path, #copy_from);
62
		strcpy(#file_path, #copy_from);
73
		Del_File(true);
63
		Del_File(true);
74
		copy_from=NULL;
-
 
75
		cut_active=false;
64
		cut_active=false;
76
	}
65
	}
77
	action_buf = COPY_PASTE_END;
66
	action_buf = COPY_PASTE_END;
78
	ActivateWindow(GetProcessSlot(Form.ID));
67
	ActivateWindow(GetProcessSlot(Form.ID));
79
	ExitProcess();
68
	ExitProcess();