{"id":7309,"date":"2022-12-20T19:37:39","date_gmt":"2022-12-20T22:37:39","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/tcl_createclosehandler-man3\/"},"modified":"2022-12-20T19:37:39","modified_gmt":"2022-12-20T22:37:39","slug":"tcl_createclosehandler-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/tcl_createclosehandler-man3\/","title":{"rendered":"Tcl_CreateCloseHandler (man3)"},"content":{"rendered":"<h1 align=\"center\">Tcl_CreateCloseHandler<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#ARGUMENTS\">ARGUMENTS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#KEYWORDS\">KEYWORDS<\/a> <\/p>\n<hr>\n<p>______________________________________________________________________________<\/p>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Tcl_CreateCloseHandler, Tcl_DeleteCloseHandler \u2212 arrange for callbacks when channels are closed<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>#include <tcl.h><\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">void <b><br \/> Tcl_CreateCloseHandler<\/b>(<i>channel, proc, clientData<\/i>)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">void <b><br \/> Tcl_DeleteCloseHandler<\/b>(<i>channel, proc, clientData<\/i>)<\/p>\n<h2>ARGUMENTS <a name=\"ARGUMENTS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\">Tcl_Channel <i>channel<\/i> (in)<\/p>\n<\/td>\n<td width=\"20%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">The channel for which to create or delete a close callback.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"40%\">\n<p>Tcl_CloseProc <i>*proc<\/i> (in)<\/p>\n<\/td>\n<td width=\"20%\"><\/td>\n<td width=\"29%\">\n<p>The procedure to call as the callback.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"40%\">\n<p>ClientData <i>clientData<\/i> (in)<\/p>\n<\/td>\n<td width=\"20%\"><\/td>\n<td width=\"29%\">\n<p>Arbitrary one-word value to pass to <i>proc<\/i>.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:71%;\">______________________________________________________________________________<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Tcl_CreateCloseHandler<\/b> arranges for <i>proc<\/i> to be called when <i>channel<\/i> is closed with <b>Tcl_Close<\/b> or <b>Tcl_UnregisterChannel<\/b>, or using the Tcl <b>close<\/b> command. <i>Proc<\/i> should match the following prototype:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">typedef void <b>Tcl_CloseProc<\/b>( <br \/> ClientData <i>clientData<\/i>);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>clientData<\/i> is the same as the value provided in the call to <b>Tcl_CreateCloseHandler<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Tcl_DeleteCloseHandler<\/b> removes a close callback for <i>channel<\/i>. The <i>proc<\/i> and <i>clientData<\/i> identify which close callback to remove; <b>Tcl_DeleteCloseHandler<\/b> does nothing if its <i>proc<\/i> and <i>clientData<\/i> arguments do not match the <i>proc<\/i> and <i>clientData<\/i> for a close handler for <i>channel<\/i>.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">close(n), Tcl_Close(3), Tcl_UnregisterChannel(3)<\/p>\n<h2>KEYWORDS <a name=\"KEYWORDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">callback, channel closing<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  Tcl_CreateCloseHandler, Tcl_DeleteCloseHandler \u2212 arrange for callbacks when channels are closed <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2536],"tags":[2538,3007,3630],"class_list":["post-7309","post","type-post","status-publish","format-standard","hentry","category-3-llamadas-de-bibliotecas","tag-2538","tag-man3","tag-tcl_createclosehandler"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=7309"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7309\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}