Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
6f4f1981
Commit
6f4f1981
authored
Jun 08, 2003
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* very beginning of drag and drop support in X11 skins
parent
5e0a04ba
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
11 deletions
+67
-11
modules/gui/skins/x11/x11_dragdrop.cpp
modules/gui/skins/x11/x11_dragdrop.cpp
+20
-1
modules/gui/skins/x11/x11_dragdrop.h
modules/gui/skins/x11/x11_dragdrop.h
+8
-2
modules/gui/skins/x11/x11_run.cpp
modules/gui/skins/x11/x11_run.cpp
+3
-2
modules/gui/skins/x11/x11_window.cpp
modules/gui/skins/x11/x11_window.cpp
+36
-6
No files found.
modules/gui/skins/x11/x11_dragdrop.cpp
View file @
6f4f1981
...
...
@@ -2,7 +2,7 @@
* x11_dragdrop.cpp: X11 implementation of the drag & drop
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: x11_dragdrop.cpp,v 1.
1 2003/04/28 14:32:57
asmax Exp $
* $Id: x11_dragdrop.cpp,v 1.
2 2003/06/08 18:17:50
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -46,6 +46,25 @@ X11DropObject::~X11DropObject()
{
}
//---------------------------------------------------------------------------
void
X11DropObject
::
DndEnter
(
ldata_t
data
)
{
fprintf
(
stderr
,
"dnd enter
\n
"
);
}
//---------------------------------------------------------------------------
void
X11DropObject
::
DndPosition
(
ldata_t
data
)
{
fprintf
(
stderr
,
"dnd position
\n
"
);
}
//---------------------------------------------------------------------------
void
X11DropObject
::
DndLeave
(
ldata_t
data
)
{
fprintf
(
stderr
,
"dnd leave
\n
"
);
}
//---------------------------------------------------------------------------
void
X11DropObject
::
DndDrop
(
ldata_t
data
)
{
fprintf
(
stderr
,
"dnd drop
\n
"
);
}
#if 0
void X11DropObject::HandleDropStart( GdkDragContext *context )
{
...
...
modules/gui/skins/x11/x11_dragdrop.h
View file @
6f4f1981
...
...
@@ -2,7 +2,7 @@
* x11_dragdrop.h: X11 implementation of the drag & drop
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: x11_dragdrop.h,v 1.
1 2003/04/28 14:32:57
asmax Exp $
* $Id: x11_dragdrop.h,v 1.
2 2003/06/08 18:17:50
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -30,6 +30,9 @@
#include <X11/Xlib.h>
//---------------------------------------------------------------------------
typedef
long
ldata_t
[
5
];
class
X11DropObject
{
private:
...
...
@@ -39,7 +42,10 @@ class X11DropObject
X11DropObject
(
intf_thread_t
*
_p_intf
);
virtual
~
X11DropObject
();
// void HandleDropStart( GdkDragContext *context );
void
DndEnter
(
ldata_t
data
);
void
DndPosition
(
ldata_t
data
);
void
DndLeave
(
ldata_t
data
);
void
DndDrop
(
ldata_t
data
);
};
//---------------------------------------------------------------------------
#endif
modules/gui/skins/x11/x11_run.cpp
View file @
6f4f1981
...
...
@@ -2,7 +2,7 @@
* x11_run.cpp:
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: x11_run.cpp,v 1.
19 2003/06/08 11:33:14
asmax Exp $
* $Id: x11_run.cpp,v 1.
20 2003/06/08 18:17:50
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -64,7 +64,8 @@ int ProcessEvent( intf_thread_t *p_intf, VlcProc *proc, XEvent *event )
// Create event to dispatch in windows
// Skin event
if
(
event
->
type
==
ClientMessage
)
if
(
event
->
type
==
ClientMessage
&&
((
XClientMessageEvent
*
)
event
)
->
message_type
==
0
)
{
msg
=
(
(
XClientMessageEvent
*
)
event
)
->
data
.
l
[
0
];
evt
=
(
Event
*
)
new
OSEvent
(
p_intf
,
...
...
modules/gui/skins/x11/x11_window.cpp
View file @
6f4f1981
...
...
@@ -2,7 +2,7 @@
* x11_window.cpp: X11 implementation of the Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: x11_window.cpp,v 1.1
5 2003/06/08 12:45:13 gbazin
Exp $
* $Id: x11_window.cpp,v 1.1
6 2003/06/08 18:17:50 asmax
Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -32,6 +32,7 @@
//--- X11 -------------------------------------------------------------------
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/extensions/shape.h>
//--- SKIN ------------------------------------------------------------------
...
...
@@ -85,7 +86,13 @@ X11Window::X11Window( intf_thread_t *p_intf, Window wnd, int x, int y,
{
// register the listview as a drop target
DropObject
=
new
X11DropObject
(
p_intf
);
// gdk_window_register_dnd( gwnd );
Atom
xdndAtom
=
XInternAtom
(
display
,
"XdndAware"
,
False
);
char
xdndVersion
=
4
;
XLOCK
;
XChangeProperty
(
display
,
wnd
,
xdndAtom
,
XA_ATOM
,
32
,
PropModeReplace
,
(
unsigned
char
*
)
&
xdndVersion
,
1
);
XUNLOCK
;
}
// Create Tool Tip window
...
...
@@ -332,10 +339,33 @@ bool X11Window::ProcessOSEvent( Event *evt )
OSAPI_PostMessage
(
this
,
WINDOW_LEAVE
,
0
,
0
);
return
true
;
/* case GDK_DROP_START:
DropObject->HandleDropStart( ( (GdkEventDND *)p2 )->context );
return true;
*/
case
ClientMessage
:
{
string
type
=
XGetAtomName
(
display
,
(
(
XClientMessageEvent
*
)
p2
)
->
message_type
);
if
(
type
==
"XdndEnter"
)
{
DropObject
->
DndEnter
(
((
XClientMessageEvent
*
)
p2
)
->
data
.
l
);
return
true
;
}
else
if
(
type
==
"XdndPosition"
)
{
DropObject
->
DndPosition
(
((
XClientMessageEvent
*
)
p2
)
->
data
.
l
);
return
true
;
}
else
if
(
type
==
"XdndLeave"
)
{
DropObject
->
DndLeave
(
((
XClientMessageEvent
*
)
p2
)
->
data
.
l
);
return
true
;
}
else
if
(
type
==
"XdndDrop"
)
{
DropObject
->
DndDrop
(
((
XClientMessageEvent
*
)
p2
)
->
data
.
l
);
return
true
;
}
}
return
false
;
default:
return
false
;
}
...
...
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