From 6e310a559853f461b32bc320475f659626379a7c Mon Sep 17 00:00:00 2001 From: sclu1034 <4508454+sclu1034@users.noreply.github.com> Date: Mon, 16 May 2022 14:38:38 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20sclu1034?= =?UTF-8?q?/lua-libpulse-glib@5634e205a21ad202444ea3632533da08b3ae802a=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- modules/lua_libpulse_glib.context.html | 211 +++++++++++++++++++++++- modules/lua_libpulse_glib.html | 2 +- modules/lua_libpulse_glib.proplist.html | 2 +- modules/lua_libpulse_glib.volume.html | 2 +- 5 files changed, 214 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 4002bc9..9355593 100644 --- a/index.html +++ b/index.html @@ -99,7 +99,7 @@ loop:run() diff --git a/modules/lua_libpulse_glib.context.html b/modules/lua_libpulse_glib.context.html index 1cdfc96..a37dbb1 100644 --- a/modules/lua_libpulse_glib.context.html +++ b/modules/lua_libpulse_glib.context.html @@ -22,6 +22,7 @@ lua_libpulse_glib.context @@ -48,6 +49,19 @@

Table of contents

+

Callback Functions

+ + + + + + + + + + + +
event_callback(context, event_type, index)The callback signature for Context:subscribe.
state_callback(context, state)The callback signature for Context:connect.

Class Context

@@ -63,6 +77,14 @@ + + + + + + + + @@ -168,6 +190,113 @@ +
+
+

Callback Functions

+
+
+
+ event_callback(context, event_type, index) +
+ +
The callback signature for Context:subscribe.

+ +

See here how to use the event_type + parameter to determine the event that triggered the callback.

+ +
+

Parameters:

+
    +
  • +
    + context + :  The context that the callback is subscribed to. +
    +
    +
    +
    + type + Context +
    +
    +
    +
  • +
  • +
    + event_type + :  A bitflag-ish value from libpulse that represents the event that caused the callback. +
    +
    +
    +
    + type + number +
    +
    +
    +
  • +
  • +
    + index +
    +
    +
    +
    + type + number +
    +
    +
    +
  • + +
+
+
+
+
+ state_callback(context, state) +
+ +
The callback signature for Context:connect.
+ +
+

Parameters:

+
    +
  • +
    + context + :  The context that the callback is subscribed to. +
    +
    +
    +
    + type + Context +
    +
    +
    +
  • +
  • +
    + state + :  An enum that represents the current connection state. +
    +
    +
    +
    + type + number +
    +
    +
    +
  • + +
+
+
+
+
+

Class Context

@@ -292,6 +421,86 @@
+
+
+ Context:subscribe(cb) +
+ +
Registers a callback function as event handler.

+ +

This callback will be called whenever the server sends a suitable event.

+ +

Any number of callbacks may be registered at the same time, and can be unscubscribed with + Context:unsubscribe, using the returned subscription ID.

+ +
+

Parameters:

+
    +
  • +
    + cb +
    +
    +
    +
    + type + function +
    +
    +
    +
  • + +
+
+
+

Returns:

+
    +
  • +
    + The subscription ID. +
    +
    +
    +
    + type + number +
    +
    +
    +
  • +
+
+
+
+
+ Context:unsubscribe(handler) +
+ +
Removes an event handler subscription.

+ +

Subscriptions may be removed either by their ID or by their callback function.

+ +
+

Parameters:

+
    +
  • +
    + handler + :  The handler to remove. +
    +
    +
    +
    + type + number or function +
    +
    +
    +
  • + +
+
+
Context:set_default_sink(sink) @@ -2111,7 +2320,7 @@
- Generated by LDoc 1.4.6, designed with Bulma. Last updated at 2022-05-16 14:22:04. + Generated by LDoc 1.4.6, designed with Bulma. Last updated at 2022-05-16 14:38:37.
diff --git a/modules/lua_libpulse_glib.html b/modules/lua_libpulse_glib.html index e14ede3..02926e4 100644 --- a/modules/lua_libpulse_glib.html +++ b/modules/lua_libpulse_glib.html @@ -154,7 +154,7 @@
- Generated by LDoc 1.4.6, designed with Bulma. Last updated at 2022-05-16 14:22:04. + Generated by LDoc 1.4.6, designed with Bulma. Last updated at 2022-05-16 14:38:37.
diff --git a/modules/lua_libpulse_glib.proplist.html b/modules/lua_libpulse_glib.proplist.html index 31e1762..346cab6 100644 --- a/modules/lua_libpulse_glib.proplist.html +++ b/modules/lua_libpulse_glib.proplist.html @@ -1029,7 +1029,7 @@
- Generated by LDoc 1.4.6, designed with Bulma. Last updated at 2022-05-16 14:22:04. + Generated by LDoc 1.4.6, designed with Bulma. Last updated at 2022-05-16 14:38:37.
diff --git a/modules/lua_libpulse_glib.volume.html b/modules/lua_libpulse_glib.volume.html index 2c002f1..34375bd 100644 --- a/modules/lua_libpulse_glib.volume.html +++ b/modules/lua_libpulse_glib.volume.html @@ -655,7 +655,7 @@
- Generated by LDoc 1.4.6, designed with Bulma. Last updated at 2022-05-16 14:22:04. + Generated by LDoc 1.4.6, designed with Bulma. Last updated at 2022-05-16 14:38:37.
Context:get_state() Returns the current connection state.
Context:subscribe(cb)Registers a callback function as event handler.
Context:unsubscribe(handler)Removes an event handler subscription.
Context:set_default_sink(sink) Sets the default sink.