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
51c1011e
Commit
51c1011e
authored
Apr 24, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mozilla: introduce new property text
Make it possible to override the default text.
parent
bc756e06
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
projects/mozilla/vlcplugin.cpp
projects/mozilla/vlcplugin.cpp
+5
-0
projects/mozilla/vlcplugin.h
projects/mozilla/vlcplugin.h
+1
-0
projects/mozilla/vlcshell.cpp
projects/mozilla/vlcshell.cpp
+9
-6
No files found.
projects/mozilla/vlcplugin.cpp
View file @
51c1011e
...
...
@@ -45,6 +45,7 @@ VlcPlugin::VlcPlugin( NPP instance, uint16 mode ) :
b_stream
(
0
),
b_autoplay
(
1
),
b_toolbar
(
0
),
psz_text
(
NULL
),
psz_target
(
NULL
),
playlist_index
(
-
1
),
libvlc_instance
(
NULL
),
...
...
@@ -145,6 +146,10 @@ NPError VlcPlugin::init(int argc, char* const argn[], char* const argv[])
{
psz_target
=
argv
[
i
];
}
else
if
(
!
strcmp
(
argn
[
i
],
"text"
)
)
{
psz_text
=
argv
[
i
];
}
else
if
(
!
strcmp
(
argn
[
i
],
"autoplay"
)
||
!
strcmp
(
argn
[
i
],
"autostart"
)
)
{
...
...
projects/mozilla/vlcplugin.h
View file @
51c1011e
...
...
@@ -145,6 +145,7 @@ public:
int
b_stream
;
int
b_autoplay
;
int
b_toolbar
;
char
*
psz_text
;
char
*
psz_target
;
void
playlist_play
(
libvlc_exception_t
*
ex
)
...
...
projects/mozilla/vlcshell.cpp
View file @
51c1011e
...
...
@@ -240,7 +240,8 @@ int16 NPP_HandleEvent( NPP instance, void * event )
ForeColor
(
whiteColor
);
MoveTo
(
(
npwindow
.
width
-
80
)
/
2
,
npwindow
.
height
/
2
);
DrawText
(
WINDOW_TEXT
,
0
,
strlen
(
WINDOW_TEXT
)
);
if
(
p_plugin
->
psz_text
)
DrawText
(
WINDOW_TEXT
,
0
,
strlen
(
WINDOW_TEXT
)
);
}
}
return
true
;
...
...
@@ -747,8 +748,9 @@ static LRESULT CALLBACK Manage( HWND p_hwnd, UINT i_msg, WPARAM wpar, LPARAM lpa
FillRect
(
hdc
,
&
rect
,
(
HBRUSH
)
GetStockObject
(
BLACK_BRUSH
)
);
SetTextColor
(
hdc
,
RGB
(
255
,
255
,
255
));
SetBkColor
(
hdc
,
RGB
(
0
,
0
,
0
));
DrawText
(
hdc
,
WINDOW_TEXT
,
strlen
(
WINDOW_TEXT
),
&
rect
,
DT_CENTER
|
DT_VCENTER
|
DT_SINGLELINE
);
if
(
p_plugin
->
psz_text
)
DrawText
(
hdc
,
WINDOW_TEXT
,
strlen
(
WINDOW_TEXT
),
&
rect
,
DT_CENTER
|
DT_VCENTER
|
DT_SINGLELINE
);
EndPaint
(
p_hwnd
,
&
paintstruct
);
return
0L
;
...
...
@@ -791,9 +793,10 @@ static void Redraw( Widget w, XtPointer closure, XEvent *event )
gcv
.
foreground
=
WhitePixel
(
p_display
,
0
);
XChangeGC
(
p_display
,
gc
,
GCForeground
,
&
gcv
);
XDrawString
(
p_display
,
video
,
gc
,
window
.
width
/
2
-
40
,
(
window
.
height
-
i_control_height
)
/
2
,
WINDOW_TEXT
,
strlen
(
WINDOW_TEXT
)
);
if
(
p_plugin
->
psz_text
)
XDrawString
(
p_display
,
video
,
gc
,
window
.
width
/
2
-
40
,
(
window
.
height
-
i_control_height
)
/
2
,
WINDOW_TEXT
,
strlen
(
WINDOW_TEXT
)
);
XFreeGC
(
p_display
,
gc
);
p_plugin
->
redrawToolbar
();
...
...
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