Subversion Repositories Kolibri OS

Rev

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

Rev 4076 Rev 4427
Line 1... Line 1...
1
//Leency 2008-2013
1
//Leency 2008-2013
Line 2... Line 2...
2
 
2
 
3
 
3
 
-
 
4
byte copy_from[4096], copy_to[4096], cut_active=0;
-
 
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
 
-
 
15
buffer_data buf_data;
4
byte copy_from[4096], copy_to[4096], cut_active=0;
16
Clipboard clipboard;
5
enum {NOCUT, CUT, COPY_PASTE_END};
17
 
Line 6... Line 18...
6
#define WIN_W 300
18
#define WIN_W 300
7
#define WIN_H 50
19
#define WIN_H 50
8
 
20
 
-
 
21
 
-
 
22
void Copy(dword pcth, char cut)
-
 
23
{
-
 
24
	strcpy(#copy_from, pcth);
-
 
25
	buf_data.size = sizeof(buffer_data);
9
 
26
	buf_data.type = 0;
10
void Copy(dword pcth, char cut)
27
	buf_data.encoding = 866;
Line 11... Line 28...
11
{
28
	strcpy(#buf_data.buffer_data, pcth);
12
	strcpy(#copy_from, pcth);
29
	clipboard.SetSlotData(sizeof(buffer_data), #buf_data);
Line 28... Line 45...
28
 
45
 
29
void Paste()
46
void Paste()
30
{
47
{
Line -... Line 48...
-
 
48
	char copy_rezult;
-
 
49
	
31
	char copy_rezult;
50
	strcpy(#copy_from, clipboard.GetSlotData(clipboard.GetSlotCount()-1)+12);
32
	
51
	
33
	if (!copy_from) ExitProcess();
52
	if (!copy_from) ExitProcess();
34
	strcpy(#copy_to, #path);
53
	strcpy(#copy_to, #path);
35
	strcat(#copy_to, #copy_from+strrchr(#copy_from,'/'));
54
	strcat(#copy_to, #copy_from+strrchr(#copy_from,'/'));