]> git.sesse.net Git - vlc/blobdiff - share/lua/README.txt
repeat is a reserved lua keyword
[vlc] / share / lua / README.txt
index b10ad8217c3c4fe09a1cd2d14f7ba1e589723d3b..7469f530c29c5113df94fb79a8e33d24cdb5b070 100644 (file)
@@ -95,7 +95,8 @@ misc.homedir(): Get the user's home directory.
 misc.configdir(): Get the user's VLC config directory.
 misc.cachedir(): Get the user's VLC cache directory.
 
-misc.datadir_list( name ): FIXME: write description ... or ditch function if it isn't usefull anymore, we have datadir and userdatadir :)
+misc.datadir_list( name ): FIXME: write description ... or ditch function
+  if it isn't usefull anymore, we have datadir and userdatadir :)
 
 misc.mdate(): Get the current date (in milliseconds).
 misc.mwait(): Wait for the given date (in milliseconds).
@@ -124,7 +125,9 @@ end
 net.close( fd ): Close file descriptor.
 net.send( fd, string, [length] ): Send data on fd.
 net.recv( fd, [max length] ): Receive data from fd.
-net.select( nfds, fds_read, fds_write, timeout ): Monitor a bunch of file descriptors. Returns number of fds to handle and the amount of time not slept. See "man select".
+net.select( nfds, fds_read, fds_write, timeout ): Monitor a bunch of file
+  descriptors. Returns number of fds to handle and the amount of time not
+  slept. See "man select".
 net.fd_set_new(): Create a new fd_set.
 local fds = vlc.net.fd_set_new()
 fds:clr( fd ) -- remove fd from set
@@ -155,10 +158,9 @@ object.find( object, type, mode ): Find an object of given type. mode can
   look in "object"'s parent objects. If set to "child" it will look in
   "object"'s children. If set to "anywhere", it will look in all the
   objects. If object is unset, the current module's object will be used.
-  Type can be: "libvlc", "module", "intf", "playlist", "input", "decoder",
-  "vout", "aout", "packetizer", "encoder", "dialogs", "announce", "demux",
-  "access", "stream", "opengl", "filter", "osdmenu", "httpd_host",
-  "interaction", "generic". This function is slow and should be avoided.
+  Type can be: "libvlc", "playlist", "input", "decoder",
+  "vout", "aout", "packetizer", "generic".
+  This function is deprecated and slow and should be avoided.
 object.find_name( object, name, mode ): Same as above except that it matches
   on the object's name and not type. This function is also slow and should
   be avoided if possible.
@@ -173,6 +175,13 @@ osd.slider( position, type, [id] ): Display slider. Position is an integer
   from 0 to 100. Type can be "horizontal" or "vertical".
 osd.channel_register(): Register a new OSD channel. Returns the channel id.
 osd.channel_clear( id ): Clear OSD channel.
+osd.menu.show(): Show the OSD menu.
+osd.menu.hide(): Hide the OSD menu.
+osd.menu.prev(): Select previous/left item.
+osd.menu.next(): Select next/right item.
+osd.menu.up(): Move selection up.
+osd.menu.down(): Move selection down.
+osd.menu.activate(): Activate/validate current selection.
 
 Playlist
 --------
@@ -183,7 +192,7 @@ playlist.play(): Play.
 playlist.pause(): Pause.
 playlist.stop(): Stop.
 playlist.clear(): Clear the playlist.
-playlist.repeat( [status] ): Toggle item repeat or set to specified value.
+playlist.repeat_( [status] ): Toggle item repeat or set to specified value.
 playlist.loop( [status] ): Toggle playlist loop or set to specified value.
 playlist.random( [status] ): Toggle playlsit random or set to specified value.
 playlist.goto( id ): Go to specified track.
@@ -290,6 +299,8 @@ var.add_callback( object, name, function, data ): Add a callback to the
 var.del_callback( object, name, function, data ): Delete a callback to
   the object's "name" variable. "function" and "data" must be the same as
   when add_callback() was called.
+var.trigger_callback( object, name ): Trigger the callbacks associated with the
+  object's "name" variable.
 
 var.command( object name, name, argument ): Issue "object name"'s "name"
   command with argument "argument".
@@ -316,6 +327,7 @@ a reference to it, all VLM items will be deleted.
 Volume
 ------
 volume.set( level ): Set volume to an absolute level between 0 and 1024.
+  256 is 100%.
 volume.get(): Get volume.
 volume.up( [n] ): Increment volume by n steps of 32. n defaults to 1.
 volume.down( [n] ): Decrement volume by n steps of 32. n defaults to 1.