diff options
author | uau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-02-21 00:49:24 +0000 |
---|---|---|
committer | uau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-02-21 00:49:24 +0000 |
commit | d5d4c6c7e224709c53d28352ce6aadc3c6e72374 (patch) | |
tree | 9fe98ae571ad6bda5cf04273cefabd6ffcbf92ae /m_property.h | |
parent | e23b2395c0265c0a0bd92c0468e20e8ce42793e6 (diff) | |
download | mpv-d5d4c6c7e224709c53d28352ce6aadc3c6e72374.tar.bz2 mpv-d5d4c6c7e224709c53d28352ce6aadc3c6e72374.tar.xz |
Split command/property handling from mplayer.c to a new file command.c.
Move some global and static variables under a struct that can be given
as a parameter. Add a context argument to the property functions so that
they do not have to depend on global/static variables.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22298 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'm_property.h')
-rw-r--r-- | m_property.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/m_property.h b/m_property.h index e43dc597ad..f022fdd1bf 100644 --- a/m_property.h +++ b/m_property.h @@ -78,7 +78,7 @@ /// \ingroup Properties /// \brief Property action callback. -typedef int(*m_property_ctrl_f)(m_option_t* prop,int action,void* arg); +typedef int(*m_property_ctrl_f)(m_option_t* prop,int action,void* arg,void *ctx); /// Do an action on a property. /** \param prop The property. @@ -86,20 +86,20 @@ typedef int(*m_property_ctrl_f)(m_option_t* prop,int action,void* arg); * \param arg Argument, usually a pointer to the data type used by the property. * \return See \ref PropertyActionsReturn. */ -int m_property_do(m_option_t* prop, int action, void* arg); +int m_property_do(m_option_t* prop, int action, void* arg, void *ctx); /// Print the current value of a property. /** \param prop The property. * \return A newly allocated string with the current value or NULL on error. */ -char* m_property_print(m_option_t* prop); +char* m_property_print(m_option_t* prop, void *ctx); /// Set a property. /** \param prop The property. * \param txt The value to set. * \return 1 on success, 0 on error. */ -int m_property_parse(m_option_t* prop, char* txt); +int m_property_parse(m_option_t* prop, char* txt, void *ctx); /// Print a list of properties. void m_properties_print_help_list(m_option_t* list); @@ -115,7 +115,7 @@ void m_properties_print_help_list(m_option_t* list); * \param str The string to expand. * \return The newly allocated expanded string. */ -char* m_properties_expand_string(m_option_t* prop_list,char* str); +char* m_properties_expand_string(m_option_t* prop_list,char* str, void *ctx); // Helpers to use MPlayer's properties @@ -123,7 +123,7 @@ char* m_properties_expand_string(m_option_t* prop_list,char* str); m_option_t* mp_property_find(const char* name); /// Do an action with an MPlayer property. -int mp_property_do(const char* name,int action, void* val); +int mp_property_do(const char* name,int action, void* val, void *ctx); /// \defgroup PropertyImplHelper Property implementation helpers /// \ingroup Properties |