Intermec ck1 Reference Guide

Page of 390
Chapter 4 — SDK Components 
152 
CK1 SDK Programmer’s Reference Manual 
OtkDialog 
OtkDialog widget provides a way to prompt you with messages or input 
requirements. OtkDialog was inherited from OtkControl.  
otk_dialog_init 
 
Purpose:  Initialize the instance to be an OtkDialog widget. In the meantime, a new 
window is created and registered to the application event loop. 
 
Prototype: 
void otk_dialog_init (OtkDialog* dialog);
 
 
Parameter:  dialog 
Pointer to the real instance 
 
Return: None 
otk_dialog_show 
 
Purpose:  Map the window of the specified OtkDialog widget and draw all the child 
widgets. The window starts to handle events occurred on itself and counts 
off other events. 
 
Prototype: 
void otk_dialog_show (OtkDialog* dialog, int x, int y
int range_w, int range_h);
 
 
Parameters:  dialog 
Pointer to the real instance 
x 
X coordinate relative to the root window 
y 
Y coordinate relative to the root window 
range_w 
Given 0 if range width relative to the root window. The 
window is located in the center of the range form given x to 
x+range_w. 
range_h 
Given 0 if range height relative to the root window. The 
window is located in the center of the range form given y to 
y+range_h. 
 
Return: None 
otk_dialog_set_user_data 
 
Purpose:  Set user data. 
 
Prototype: 
void otk_dialog_set_user_data (OtkDialog* dialog, void* 
user_data);
 
 
Parameter:  dialog 
Pointer to the real instance 
user_data 
Pointer to the specified data 
 
Return: None