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
ea5a42d2
Commit
ea5a42d2
authored
Dec 04, 2002
by
Jon Lech Johansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./modules/gui/macosx/vout.m: mouse coordinates support.
parent
531ca620
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
3 deletions
+73
-3
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+1
-2
modules/gui/macosx/vout.m
modules/gui/macosx/vout.m
+72
-1
No files found.
modules/gui/macosx/intf.m
View file @
ea5a42d2
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin
* intf.m: MacOS X interface plugin
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: intf.m,v 1.
5 2002/11/28 17:35:01 sam
Exp $
* $Id: intf.m,v 1.
6 2002/12/04 20:51:23 jlj
Exp $
*
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
* Christophe Massiot <massiot@via.ecp.fr>
...
@@ -902,7 +902,6 @@ static void Run( intf_thread_t *p_intf )
...
@@ -902,7 +902,6 @@ static void Run( intf_thread_t *p_intf )
[
p_req
->
p_vout
->
p_sys
->
o_window
setTitle
:
[
NSString
[
p_req
->
p_vout
->
p_sys
->
o_window
setTitle
:
[
NSString
stringWithCString:
VOUT_TITLE
" (QuickTime)"
]];
stringWithCString:
VOUT_TITLE
" (QuickTime)"
]];
[
p_req
->
p_vout
->
p_sys
->
o_window
setAcceptsMouseMovedEvents
:
YES
];
[
p_req
->
p_vout
->
p_sys
->
o_window
makeKeyAndOrderFront
:
nil
];
[
p_req
->
p_vout
->
p_sys
->
o_window
makeKeyAndOrderFront
:
nil
];
p_req
->
i_result
=
1
;
p_req
->
i_result
=
1
;
...
...
modules/gui/macosx/vout.m
View file @
ea5a42d2
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* vout.m: MacOS X video output plugin
* vout.m: MacOS X video output plugin
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* Copyright (C) 2001, 2002 VideoLAN
* $Id: vout.m,v 1.
4 2002/11/18 23:00:41 massiot
Exp $
* $Id: vout.m,v 1.
5 2002/12/04 20:51:23 jlj
Exp $
*
*
* Authors: Colin Delacroix <colin@zoy.org>
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
* Florian G. Pflug <fgp@phlo.org>
...
@@ -816,4 +816,75 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -816,4 +816,75 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
p_vout
->
i_changes
|=
VOUT_SIZE_CHANGE
;
p_vout
->
i_changes
|=
VOUT_SIZE_CHANGE
;
}
}
-
(
BOOL
)
acceptsFirstResponder
{
return
(
YES
);
}
-
(
BOOL
)
becomeFirstResponder
{
[[
self
window
]
setAcceptsMouseMovedEvents
:
YES
];
return
(
YES
);
}
-
(
BOOL
)
resignFirstResponder
{
[[
self
window
]
setAcceptsMouseMovedEvents
:
NO
];
return
(
YES
);
}
-
(
void
)
mouseUp
:(
NSEvent
*
)
o_event
{
switch
(
[
o_event
type
]
)
{
case
NSLeftMouseUp
:
{
vlc_value_t
val
;
val
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_vout
,
"mouse-clicked"
,
val
);
}
break
;
default:
[
super
mouseUp
:
o_event
];
break
;
}
}
-
(
void
)
mouseMoved
:(
NSEvent
*
)
o_event
{
NSPoint
ml
;
NSRect
s_rect
;
BOOL
b_inside
;
s_rect
=
[
self
bounds
];
ml
=
[
self
convertPoint
:
[
o_event
locationInWindow
]
fromView
:
nil
];
b_inside
=
[
self
mouse
:
ml
inRect
:
s_rect
];
if
(
b_inside
)
{
vlc_value_t
val
;
int
i_width
,
i_height
,
i_x
,
i_y
;
vout_PlacePicture
(
p_vout
,
(
unsigned
int
)
s_rect
.
size
.
width
,
(
unsigned
int
)
s_rect
.
size
.
height
,
&
i_x
,
&
i_y
,
&
i_width
,
&
i_height
);
val
.
i_int
=
(
((
int
)
ml
.
x
)
-
i_x
)
*
p_vout
->
render
.
i_width
/
i_width
;
var_Set
(
p_vout
,
"mouse-x"
,
val
);
val
.
i_int
=
(
((
int
)
ml
.
y
)
-
i_y
)
*
p_vout
->
render
.
i_height
/
i_height
;
var_Set
(
p_vout
,
"mouse-y"
,
val
);
val
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_vout
,
"mouse-moved"
,
val
);
}
else
{
[
super
mouseMoved
:
o_event
];
}
}
@end
@end
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