{"title":"Display a screen on a large screen terminal - C","category":"default","creationDate":1776961627,"content":"<h2 id=\"implement-the-callback\">Implement the callback<\/h2>\n<p>Implement the callback based on the signature in the<span translate=\"no\"><strong>\u00a0show_screen_extern.h<\/strong><\/span>\u00a0file and pass this as a parameter of the\u00a0<code>show_screen<\/code>\u00a0call. For more information on how to do this, see\u00a0<a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/calls-and-callbacks-c-library\/implement-callbacks\">Implement callbacks<\/a>.<\/p>\n<h3 id=\"code-example\">Code example<\/h3>\n<pre><code class=\"language-cpp\">void show_screen_CB(show_screen_response *p, void *echo_struct){\napp_context_t * POS = (app_context_t *)echo_struct;\n\n}<\/code><\/pre>\n<h2 id=\"allocate-the-request-structure\">Allocate the request structure<\/h2>\n<p>Use <code>show_screen_allocate<\/code> to\u00a0allocate, initialize and return a\u00a0<code>show_screen_request<\/code>\u00a0structure. Populate the request by performing string duplication.<\/p>\n<p>If you want the data for later use, retain it, or it will be released automatically.<\/p>\n<h2 id=\"call-the-show_screen-function\">Call the show_screen function<\/h2>\n<p>Call the <code>show_screen<\/code> function to display specific screens prior to the processing the tender or terminals with large screens (MX925, MX915). Use this function to display order items on a virtual receipt.<\/p>\n<h3 id=\"parameters\">Parameters<\/h3>\n<table>\n<thead>\n<tr>\n<th>Value<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>show_tender_request<\/code><\/td>\n<td>Pointer to the <code>show_screen_request<\/code> struct, this struct contains all the input parameters for this call.<\/td>\n<\/tr>\n<tr>\n<td><code>show_screen_CB<\/code><\/td>\n<td>Pointer to the callback function in the POS that will be called with the results of the <code>show_screen<\/code> call.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"code-example-1\">Code example<\/h3>\n<p>The declaration of the call to start a transaction is as follows:<\/p>\n<pre><code class=\"language-cpp\">ADYLibraryResult show_screen(show_screen_request * show_screen_request_ptr, void(*callback_function)(show_screen_response *, void *), void * echo_struct);<\/code><\/pre>\n<h2 id=\"handle-the-callback\">Handle the callback<\/h2>\n<p>The <code>show_screen_CB<\/code> returns the immediate response to the call and a pointer to the POS-defined echo struct.<\/p>\n<h3 id=\"parameters-1\">Parameters<\/h3>\n<table>\n<thead>\n<tr>\n<th>Value<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>show_screen_response<\/code><\/td>\n<td>The immediate response to the show_screen call, which includes the ID and status of the screen, and the result of the call.<\/td>\n<\/tr>\n<tr>\n<td><code>echo_struct<\/code><\/td>\n<td>Pointer to a POS defined struct. Returned in the callback. It can be used to share a POS data struct between the call to the library and the callback from the library in response to the call.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/extras-c-library\/display-a-screen-on-a-large-screen-terminal-c","articleFields":{"id":"28872083","type":"page","_expandable":{"operations":""},"status":"current"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/extras-c-library\/display-a-screen-on-a-large-screen-terminal-c","title":"Display a screen on a large screen terminal - C","content":"Implement the callback\nImplement the callback based on the signature in the\u00a0show_screen_extern.h\u00a0file and pass this as a parameter of the\u00a0show_screen\u00a0call. For more information on how to do this, see\u00a0Implement callbacks.\nCode example\nvoid show_screen_CB(show_screen_response *p, void *echo_struct){\napp_context_t * POS = (app_context_t *)echo_struct;\n\n}\nAllocate the request structure\nUse show_screen_allocate to\u00a0allocate, initialize and return a\u00a0show_screen_request\u00a0structure. Populate the request by performing string duplication.\nIf you want the data for later use, retain it, or it will be released automatically.\nCall the show_screen function\nCall the show_screen function to display specific screens prior to the processing the tender or terminals with large screens (MX925, MX915). Use this function to display order items on a virtual receipt.\nParameters\n\n\n\nValue\nDescription\n\n\n\n\nshow_tender_request\nPointer to the show_screen_request struct, this struct contains all the input parameters for this call.\n\n\nshow_screen_CB\nPointer to the callback function in the POS that will be called with the results of the show_screen call.\n\n\n\nCode example\nThe declaration of the call to start a transaction is as follows:\nADYLibraryResult show_screen(show_screen_request * show_screen_request_ptr, void(*callback_function)(show_screen_response *, void *), void * echo_struct);\nHandle the callback\nThe show_screen_CB returns the immediate response to the call and a pointer to the POS-defined echo struct.\nParameters\n\n\n\nValue\nDescription\n\n\n\n\nshow_screen_response\nThe immediate response to the show_screen call, which includes the ID and status of the screen, and the result of the call.\n\n\necho_struct\nPointer to a POS defined struct. Returned in the callback. It can be used to share a POS data struct between the call to the library and the callback from the library in response to the call.\n\n\n","type":"page","locale":"pt","boost":14,"hierarchy":{"lvl0":"Home","lvl1":"Terminais","lvl2":"Deprecation of classic libraries","lvl3":"Library integrations","lvl4":"C library integration","lvl5":"Extras","lvl6":"Display a screen on a large screen terminal - C"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/point-of-sale","lvl2":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation","lvl3":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations","lvl4":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration","lvl5":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/extras-c-library","lvl6":"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/extras-c-library\/display-a-screen-on-a-large-screen-terminal-c"},"levels":7,"category":"In-person payments","category_color":"green","tags":["Display","screen","large","screen","terminal"]}}
