Intermec ck1 Reference Guide
Chapter 1 — Installing and Using the SDK
CK1 SDK Programmer’s Reference Manual
19
Enter the CK1 IP address, user name, and password and click OK. The
Terminal dialog box logs into the CK1.
Terminal dialog box logs into the CK1.
To clear the Terminal dialog box
• Click Clear. All of the text in the Terminal dialog box disappears.
Example Code
This section provides example code for designing a user interface (UI) and
for creating the example program hello.c.
for creating the example program hello.c.
Designing the Basic UI
Before designing the UI, you should understand the workflows of
Microwindows and the usages of the libraries. The documents of Nano-X
are provided on the Microwindows official site,
http://www.microwindows.org.
Microwindows and the usages of the libraries. The documents of Nano-X
are provided on the Microwindows official site,
http://www.microwindows.org.
Once you understand Microwindows, you can develop a Microwindows
application.
application.
To design the basic UI
1
Call the GrOpen function to connect your application with Nano-X
server for receiving the message from the server.
server for receiving the message from the server.
if (GrOpen() < 0)
{
fprintf(stderr, "cannot open graphics\n");
return 1;
}
{
fprintf(stderr, "cannot open graphics\n");
return 1;
}
2
Build a new window for developing the UI.
win = GrNewWindow(GR_ROOT_WINDOW_ID,
0, 0, 100, 100, 0, WHITE, BLACK);
0, 0, 100, 100, 0, WHITE, BLACK);
3
Set the events that can be accepted by this window. The Nano-X server
passes needed events to this window according to this setting.
passes needed events to this window according to this setting.
GrSelectEvents(win, GR_EVENT_MASK_EXPOSURE |
GR_EVENT_MASK_CLOSE_REQ);
GR_EVENT_MASK_CLOSE_REQ);