gr_context_get_control
#include <gre/gre.h>
int gr_context_get_control(
gr_action_context_t *action_context,
char *buffer,
int buffer_len
);
The gr_context_get_control function stores the fully qualified name of
the control in the buffer provided up to buffer_len characters.
gr_context_get_control will build the fully qulified name for the control context based on the action context and store it in the buffer that is provided, up to buffer_len bytes. It will return the length of the fully qualified name. If there is no control context in the action context, the function will return -1 and set the first character in buffer to NULL.
Parameters
| Parameter | Type | Description |
|---|---|---|
action_context | gr_action_context_t* | The action context to get the fully qualified name from. |
buffer | char* | The character buffer to store the control's fully qualified name in. The first character may be set to NULL if there is no control in the action context. |
buffer_len | int | The storage space that the buffer has to store the name, see function gr_context_max_fqn(). |
Returns
| Type | Description |
|---|---|
int | The length of the control name if there is a control in the context, -1 otherwise. |