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
1cc34d8a
Commit
1cc34d8a
authored
Jul 27, 2015
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add text_segment_NewInheritStyle
parent
c1d3fe80
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
include/vlc_text_style.h
include/vlc_text_style.h
+10
-0
src/libvlccore.sym
src/libvlccore.sym
+1
-0
src/misc/text_style.c
src/misc/text_style.c
+16
-0
No files found.
include/vlc_text_style.h
View file @
1cc34d8a
...
...
@@ -139,6 +139,16 @@ VLC_API void text_style_Delete( text_style_t * );
*/
VLC_API
text_segment_t
*
text_segment_New
(
const
char
*
);
/**
* This function will create a new text segment and duplicates the style passed as argument
*
* You should use text_segment_ChainDelete to destroy it, to clean all
* the linked segments, or text_segment_Delete to free a specic one
*
* This doesn't initialize the text.
*/
VLC_API
text_segment_t
*
text_segment_NewInheritStyle
(
const
text_style_t
*
p_style
);
/**
* Delete a text segment and its content.
*
...
...
src/libvlccore.sym
View file @
1cc34d8a
...
...
@@ -419,6 +419,7 @@ subpicture_region_Copy
subpicture_region_Delete
subpicture_region_New
text_segment_New
text_segment_NewInheritStyle
text_segment_Delete
text_segment_ChainDelete
text_segment_Copy
...
...
src/misc/text_style.c
View file @
1cc34d8a
...
...
@@ -105,6 +105,22 @@ text_segment_t *text_segment_New( const char *psz_text )
return
segment
;
}
text_segment_t
*
text_segment_NewInheritStyle
(
const
text_style_t
*
p_style
)
{
if
(
!
p_style
)
return
NULL
;
//FIXME: Allow this, even if it is an alias to text_segment_New( NULL ) ?
text_segment_t
*
p_segment
=
text_segment_New
(
NULL
);
if
(
unlikely
(
!
p_segment
)
)
return
NULL
;
p_segment
->
style
=
text_style_Duplicate
(
p_style
);
if
(
unlikely
(
!
p_segment
->
style
)
)
{
text_segment_Delete
(
p_segment
);
return
NULL
;
}
return
p_segment
;
}
void
text_segment_Delete
(
text_segment_t
*
segment
)
{
if
(
segment
!=
NULL
)
...
...
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