Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c2f73b97
Commit
c2f73b97
authored
May 27, 2014
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Jun 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Import text/plain XDND selections through the clipboard.
parent
d33989f6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
57 deletions
+1
-57
clipboard.c
dlls/winex11.drv/clipboard.c
+1
-0
xdnd.c
dlls/winex11.drv/xdnd.c
+0
-57
No files found.
dlls/winex11.drv/clipboard.c
View file @
c2f73b97
...
...
@@ -186,6 +186,7 @@ static const struct
}
builtin_formats
[]
=
{
{
CF_TEXT
,
XA_STRING
,
X11DRV_CLIPBOARD_ImportXAString
,
X11DRV_CLIPBOARD_ExportString
},
{
CF_TEXT
,
XATOM_text_plain
,
X11DRV_CLIPBOARD_ImportXAString
,
X11DRV_CLIPBOARD_ExportString
},
{
CF_BITMAP
,
XATOM_WCF_BITMAP
,
X11DRV_CLIPBOARD_ImportClipboardData
,
NULL
},
{
CF_METAFILEPICT
,
XATOM_WCF_METAFILEPICT
,
X11DRV_CLIPBOARD_ImportMetaFilePict
,
X11DRV_CLIPBOARD_ExportMetaFilePict
},
{
CF_SYLK
,
XATOM_WCF_SYLK
,
X11DRV_CLIPBOARD_ImportClipboardData
,
X11DRV_CLIPBOARD_ExportClipboardData
},
...
...
dlls/winex11.drv/xdnd.c
View file @
c2f73b97
...
...
@@ -73,13 +73,11 @@ static HWND XDNDLastDropTargetWnd;
static
void
X11DRV_XDND_InsertXDNDData
(
int
property
,
int
format
,
void
*
data
,
unsigned
int
len
);
static
int
X11DRV_XDND_DeconstructTextURIList
(
int
property
,
void
*
data
,
int
len
);
static
int
X11DRV_XDND_DeconstructTextPlain
(
int
property
,
void
*
data
,
int
len
);
static
void
X11DRV_XDND_MapFormat
(
Display
*
display
,
Window
xwin
,
unsigned
int
property
,
unsigned
char
*
data
,
int
len
);
static
void
X11DRV_XDND_ResolveProperty
(
Display
*
display
,
Window
xwin
,
Time
tm
,
Atom
*
types
,
unsigned
long
count
);
static
void
X11DRV_XDND_SendDropFiles
(
HWND
hwnd
);
static
void
X11DRV_XDND_FreeDragDropOp
(
void
);
static
unsigned
int
X11DRV_XDND_UnixToDos
(
char
**
lpdest
,
char
*
lpsrc
,
int
len
);
static
WCHAR
*
X11DRV_XDND_URIToDOS
(
char
*
encodedURI
);
static
CRITICAL_SECTION
xdnd_cs
;
...
...
@@ -566,8 +564,6 @@ static void X11DRV_XDND_MapFormat(Display *display, Window xwin, unsigned int pr
if
(
property
==
x11drv_atom
(
text_uri_list
))
X11DRV_XDND_DeconstructTextURIList
(
property
,
data
,
len
);
else
if
(
property
==
x11drv_atom
(
text_plain
))
X11DRV_XDND_DeconstructTextPlain
(
property
,
data
,
len
);
else
{
/* use the clipboard import functions for other types */
...
...
@@ -676,25 +672,6 @@ static int X11DRV_XDND_DeconstructTextURIList(int property, void* data, int len)
/**************************************************************************
* X11DRV_XDND_DeconstructTextPlain
*
* Interpret text/plain Data and add records to <dndfmt> linked list
*/
static
int
X11DRV_XDND_DeconstructTextPlain
(
int
property
,
void
*
data
,
int
len
)
{
char
*
dostext
;
/* Always supply plain text */
X11DRV_XDND_UnixToDos
(
&
dostext
,
data
,
len
);
X11DRV_XDND_InsertXDNDData
(
property
,
CF_TEXT
,
dostext
,
strlen
(
dostext
));
TRACE
(
"CF_TEXT (%d): %s
\n
"
,
CF_TEXT
,
dostext
);
return
1
;
}
/**************************************************************************
* X11DRV_XDND_SendDropFiles
*/
static
void
X11DRV_XDND_SendDropFiles
(
HWND
hwnd
)
...
...
@@ -766,40 +743,6 @@ static void X11DRV_XDND_FreeDragDropOp(void)
}
/**************************************************************************
* X11DRV_XDND_UnixToDos
*/
static
unsigned
int
X11DRV_XDND_UnixToDos
(
char
**
lpdest
,
char
*
lpsrc
,
int
len
)
{
int
i
;
unsigned
int
destlen
,
lines
;
for
(
i
=
0
,
lines
=
0
;
i
<=
len
;
i
++
)
{
if
(
lpsrc
[
i
]
==
'\n'
)
lines
++
;
}
destlen
=
len
+
lines
+
1
;
if
(
lpdest
)
{
char
*
lpstr
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
destlen
);
for
(
i
=
0
,
lines
=
0
;
i
<=
len
;
i
++
)
{
if
(
lpsrc
[
i
]
==
'\n'
)
lpstr
[
++
lines
+
i
]
=
'\r'
;
lpstr
[
lines
+
i
]
=
lpsrc
[
i
];
}
*
lpdest
=
lpstr
;
}
return
lines
;
}
/**************************************************************************
* X11DRV_XDND_URIToDOS
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment