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
41234e88
Commit
41234e88
authored
Aug 20, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
control/tree.c: Notify subtree/addition removal.
parent
9794062c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
0 deletions
+68
-0
include/vlc/libvlc_structures.h
include/vlc/libvlc_structures.h
+21
-0
src/control/tree.c
src/control/tree.c
+47
-0
No files found.
include/vlc/libvlc_structures.h
View file @
41234e88
...
...
@@ -307,6 +307,10 @@ typedef enum libvlc_event_type_t {
libvlc_MediaListItemDeleted
,
libvlc_MediaListItemChanged
,
libvlc_TreeSubtreeAdded
,
libvlc_TreeSubtreeDeleted
,
libvlc_TreeItemValueChanged
,
}
libvlc_event_type_t
;
/**
...
...
@@ -348,6 +352,23 @@ typedef struct libvlc_event_t
libvlc_media_descriptor_t
*
item
;
int
index
;
}
media_list_item_changed
;
/* Tree */
struct
{
libvlc_tree_t
*
subtree
;
int
index
;
}
tree_subtree_added
;
struct
{
libvlc_tree_t
*
subtree
;
int
index
;
}
tree_subtree_deleted
;
struct
{
void
*
new_value
;
}
tree_item_value_changed
;
}
u
;
}
libvlc_event_t
;
...
...
src/control/tree.c
View file @
41234e88
...
...
@@ -40,7 +40,15 @@ notify_subtree_addition( libvlc_tree_t * p_tree,
libvlc_tree_t
*
p_subtree
,
int
index
)
{
libvlc_event_t
event
;
/* Construct the event */
event
.
type
=
libvlc_TreeSubtreeAdded
;
event
.
u
.
tree_subtree_added
.
subtree
=
p_subtree
;
event
.
u
.
tree_subtree_added
.
index
=
index
;
/* Send the event */
libvlc_event_send
(
p_tree
->
p_event_manager
,
&
event
);
}
/**************************************************************************
...
...
@@ -53,9 +61,39 @@ notify_subtree_deletion( libvlc_tree_t * p_tree,
libvlc_tree_t
*
p_subtree
,
int
index
)
{
libvlc_event_t
event
;
/* Construct the event */
event
.
type
=
libvlc_TreeSubtreeDeleted
;
event
.
u
.
tree_subtree_deleted
.
subtree
=
p_subtree
;
event
.
u
.
tree_subtree_deleted
.
index
=
index
;
/* Send the event */
libvlc_event_send
(
p_tree
->
p_event_manager
,
&
event
);
}
#ifdef NOT_USED
/**************************************************************************
* notify_tree_item_value_changed (private)
*
* Do the appropriate action when a tree's item changes.
**************************************************************************/
static
void
notify_tree_item_value_changed
(
libvlc_tree_t
*
p_tree
,
libvlc_tree_t
*
p_subtree
,
int
index
)
{
libvlc_event_t
event
;
/* Construct the event */
event
.
type
=
libvlc_TreeItemValueChanged
;
event
.
u
.
tree_item_value_changed
.
new_value
=
p_tree
->
p_item
;
/* Send the event */
libvlc_event_send
(
p_tree
->
p_event_manager
,
&
event
);
}
#endif
/**************************************************************************
* new (Private)
**************************************************************************/
...
...
@@ -76,6 +114,15 @@ libvlc_tree_new( libvlc_retain_function item_retain,
p_tree
->
i_refcount
=
1
;
p_tree
->
p_item
=
item
;
ARRAY_INIT
(
p_tree
->
subtrees
);
p_tree
->
p_event_manager
=
libvlc_event_manager_new
(
p_tree
,
NULL
,
p_e
);
libvlc_event_manager_register_event_type
(
p_tree
->
p_event_manager
,
libvlc_TreeSubtreeAdded
,
p_e
);
libvlc_event_manager_register_event_type
(
p_tree
->
p_event_manager
,
libvlc_TreeSubtreeDeleted
,
p_e
);
libvlc_event_manager_register_event_type
(
p_tree
->
p_event_manager
,
libvlc_TreeItemValueChanged
,
p_e
);
return
p_tree
;
}
...
...
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