… | |
… | |
1147 | =cut |
1147 | =cut |
1148 | |
1148 | |
1149 | sub ext_event($$%) { |
1149 | sub ext_event($$%) { |
1150 | my ($self, $type, %msg) = @_; |
1150 | my ($self, $type, %msg) = @_; |
1151 | |
1151 | |
1152 | delete $msg{msgid}; |
1152 | $self->ns->ext_event ($type, %msg); |
1153 | $msg{msgtype} = "event"; |
|
|
1154 | $msg{eventtype} = $type; |
|
|
1155 | |
|
|
1156 | $self->send ("ext " . cf::to_json \%msg); |
|
|
1157 | } |
1153 | } |
1158 | |
1154 | |
1159 | package cf; |
1155 | package cf; |
1160 | |
1156 | |
1161 | =back |
1157 | =back |
… | |
… | |
2014 | |
2010 | |
2015 | utf8::encode $text; |
2011 | utf8::encode $text; |
2016 | $self->send_packet (sprintf "drawinfo %d %s", $flags || cf::NDI_BLACK, $text); |
2012 | $self->send_packet (sprintf "drawinfo %d %s", $flags || cf::NDI_BLACK, $text); |
2017 | } |
2013 | } |
2018 | |
2014 | |
|
|
2015 | =item $client->ext_event ($type, %msg) |
|
|
2016 | |
|
|
2017 | Sends an exti event to the client. |
|
|
2018 | |
|
|
2019 | =cut |
|
|
2020 | |
|
|
2021 | sub cf::client::ext_event($$%) { |
|
|
2022 | my ($self, $type, %msg) = @_; |
|
|
2023 | |
|
|
2024 | $msg{msgtype} = "event_$type"; |
|
|
2025 | $self->send_packet ("ext " . cf::to_json \%msg); |
|
|
2026 | } |
2019 | |
2027 | |
2020 | =item $success = $client->query ($flags, "text", \&cb) |
2028 | =item $success = $client->query ($flags, "text", \&cb) |
2021 | |
2029 | |
2022 | Queues a query to the client, calling the given callback with |
2030 | Queues a query to the client, calling the given callback with |
2023 | the reply text on a reply. flags can be C<cf::CS_QUERY_YESNO>, |
2031 | the reply text on a reply. flags can be C<cf::CS_QUERY_YESNO>, |