-
Notifications
You must be signed in to change notification settings - Fork 0
/
a00020.html
823 lines (734 loc) · 49.8 KB
/
a00020.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Contiki 2.5: CTK device driver functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="dirs.html"><span>Directories</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>CTK device driver functions<br/>
<small>
[<a class="el" href="a01549.html">CTK graphical user interface</a>]</small>
</h1>
<p>The CTK device driver functions are divided into two modules, the ctk-draw module and the ctk-arch module.
<a href="#_details">More...</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="a00036.html">ctk_widget</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The generic CTK widget structure that contains all other widget structures. <a href="a00036.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html">ctk_window</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Representation of a CTK window. <a href="a00038.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html">ctk_menuitem</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Representation of an individual menu item. <a href="a00034.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html">ctk_menu</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Representation of an individual menu. <a href="a00033.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="a00035.html">ctk_menus</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Representation of the menu bar. <a href="a00035.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#ga0d2cd2b8d5b238bdeedb7a8cf5c0e58a">CTK_WIDGET_SEPARATOR</a> 1</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Widget number: The CTK separator widget. <a href="#ga0d2cd2b8d5b238bdeedb7a8cf5c0e58a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#ga1fb739218fa5f53c992a3bcf2c7e0c57">CTK_WIDGET_LABEL</a> 2</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Widget number: The CTK label widget. <a href="#ga1fb739218fa5f53c992a3bcf2c7e0c57"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#gae8adf9839c98a840b0b9b7c070422440">CTK_WIDGET_BUTTON</a> 3</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Widget number: The CTK button widget. <a href="#gae8adf9839c98a840b0b9b7c070422440"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#gad35ef85bb5562d70cee05f97968dadbc">CTK_WIDGET_HYPERLINK</a> 4</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Widget number: The CTK hyperlink widget. <a href="#gad35ef85bb5562d70cee05f97968dadbc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#ga4f9b2f0c9b72be56a1aa1abab7867c2c">CTK_WIDGET_TEXTENTRY</a> 5</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Widget number: The CTK textentry widget. <a href="#ga4f9b2f0c9b72be56a1aa1abab7867c2c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#ga9e586304672935cb02e405d7efecfb5b">CTK_WIDGET_BITMAP</a> 6</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Widget number: The CTK bitmap widget. <a href="#ga9e586304672935cb02e405d7efecfb5b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#ga392197354637697c585c8f6f618e5507">CTK_WIDGET_ICON</a> 7</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Widget number: The CTK icon widget. <a href="#ga392197354637697c585c8f6f618e5507"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#ga8c298ccc15c01a838e11d4391629f7bf">CTK_FOCUS_NONE</a> 0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Widget focus flag: no focus. <a href="#ga8c298ccc15c01a838e11d4391629f7bf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#gafa49312af6ac5411ecbc0c11caa6fcf2">CTK_FOCUS_WIDGET</a> 1</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Widget focus flag: widget has focus. <a href="#gafa49312af6ac5411ecbc0c11caa6fcf2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#gaa6bcc3324b455c546e94ba330f6c719b">CTK_FOCUS_WINDOW</a> 2</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Widget focus flag: widget's window is the foremost one. <a href="#gaa6bcc3324b455c546e94ba330f6c719b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#ga609601e009471eb21c7ff906358a2faf">CTK_FOCUS_DIALOG</a> 4</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Widget focus flag: widget is in a dialog. <a href="#ga609601e009471eb21c7ff906358a2faf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#gaba3ae4d2b9baa5953b47eeef61927398">ctk_arch_getkey</a>() getkey_arch()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get a keypress from the keyboard input queue. <a href="#gaba3ae4d2b9baa5953b47eeef61927398"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#ga54b6b0ef960adb9dd53af7c5b1af0968">ctk_arch_keyavail</a>() keyavail_arch()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Check if there is a keypress in the keyboard input queue. <a href="#ga54b6b0ef960adb9dd53af7c5b1af0968"></a><br/></td></tr>
<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef char </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#gaa6eb41324497b3d828d208c0efa6fa90">ctk_arch_key_t</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The keyboard character type of the system. <a href="#gaa6eb41324497b3d828d208c0efa6fa90"></a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#ga271a33b474a94da63244e94c84127303">ctk_draw_init</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The initialization function. <a href="#ga271a33b474a94da63244e94c84127303"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#gae6e8805e52467b2942c2af3e0080b6e1">ctk_draw_clear</a> (unsigned char clipy1, unsigned char clipy2)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear the screen between the clip bounds. <a href="#gae6e8805e52467b2942c2af3e0080b6e1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#gaeade88277aa23594cd8dc9f4caeba46d">ctk_draw_clear_window</a> (struct <a class="el" href="a00038.html">ctk_window</a> *window, unsigned char focus, unsigned char clipy1, unsigned char clipy2)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw the window background. <a href="#gaeade88277aa23594cd8dc9f4caeba46d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#gae172d39b14556ee88707d4e6979abb34">ctk_draw_window</a> (struct <a class="el" href="a00038.html">ctk_window</a> *window, unsigned char focus, unsigned char clipy1, unsigned char clipy2, unsigned char draw_borders)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw a window onto the screen. <a href="#gae172d39b14556ee88707d4e6979abb34"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#gae973e0af36f51f685e88216fa10ceb56">ctk_draw_dialog</a> (struct <a class="el" href="a00038.html">ctk_window</a> *dialog)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw a dialog onto the screen. <a href="#gae973e0af36f51f685e88216fa10ceb56"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#ga2c09354ec5cfdb654b09cf478e8f2399">ctk_draw_widget</a> (struct <a class="el" href="a00036.html">ctk_widget</a> *w, unsigned char focus, unsigned char clipy1, unsigned char clipy2)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw a widget on a window. <a href="#ga2c09354ec5cfdb654b09cf478e8f2399"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#gaa91a72c85f1c0a96ef85661b3b655067">ctk_draw_menus</a> (struct <a class="el" href="a00035.html">ctk_menus</a> *menus)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw the menus on the virtual VNC desktop. <a href="#gaa91a72c85f1c0a96ef85661b3b655067"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">CCIF unsigned char </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#ga573ade441a6b0b0ccbaf5f1ccc90fa9b">ctk_draw_width</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Obtain the height of the VNC desktop. <a href="#ga573ade441a6b0b0ccbaf5f1ccc90fa9b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">CCIF unsigned char </td><td class="memItemRight" valign="bottom"><a class="el" href="a00020.html#gac8b314f484f9c768f337ab2daabf9318">ctk_draw_height</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Obtain the height of the VNC desktop. <a href="#gac8b314f484f9c768f337ab2daabf9318"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>The CTK device driver functions are divided into two modules, the ctk-draw module and the ctk-arch module. </p>
<p>The purpose of the ctk-arch and the ctk-draw modules is to act as an interface between the CTK and the actual hardware of the system on which Contiki is run. The ctk-arch takes care of the keyboard input from the user, and the ctk-draw is responsible for drawing the CTK desktop, windows and user interface widgets onto the actual screen.</p>
<p>More information about the ctk-draw and the ctk-arch modules can be found in the sections <a class="el" href="a00020.html">The ctk-draw module</a> and <a class="el" href="a00020.html">The ctk-arch module</a>. </p>
<h3><a class="anchor" id="ctk-draw">The ctk-draw module</a></h3><p>In order to work efficiently even on limited systems, CTK uses a simple coordinate system, where the screen is addressed using character coordinates instead of pixel coordinates.</p>
<p>This makes it trivial to implement the coordinate system on a text-based screen, and significantly reduces complexity for pixel based screen systems.</p>
<p>The top left of the screen is (0,0) with x and y coordinates growing downwards and to the right.</p>
<p>It is the responsibility of the ctk-draw module to keep track of the screen size and must implement the two functions ctk_draw_width() and ctk_draw_height(), which are used by the CTK for querying the screen size. The functions must return the width and the height of the ctk-draw screen in character coordinates.</p>
<p>The ctk-draw module is responsible for drawing CTK windows onto the screen through the function <a class="el" href="a00020.html#gae172d39b14556ee88707d4e6979abb34" title="Draw a window onto the screen.">ctk_draw_window()</a>.. A pseudo-code implementation of this function might look like this: </p>
<div class="fragment"><pre class="fragment"> <a class="code" href="a00020.html#gae172d39b14556ee88707d4e6979abb34" title="Draw a window onto the screen.">ctk_draw_window</a>(window, focus, clipy1, clipy2, draw_borders) {
<span class="keywordflow">if</span>(draw_borders) {
draw_window_borders(window, focus, clipy1, clipy2);
}
<span class="keywordflow">foreach</span>(widget, window->inactive) {
<a class="code" href="a00020.html#ga2c09354ec5cfdb654b09cf478e8f2399" title="Draw a widget on a window.">ctk_draw_widget</a>(widget, focus, clipy1, clipy2);
}
<span class="keywordflow">foreach</span>(widget, window->active) {
<span class="keywordflow">if</span>(widget == window->focused) {
<a class="code" href="a00020.html#ga2c09354ec5cfdb654b09cf478e8f2399" title="Draw a widget on a window.">ctk_draw_widget</a>(widget, focus | <a class="code" href="a00020.html#gafa49312af6ac5411ecbc0c11caa6fcf2" title="Widget focus flag: widget has focus.">CTK_FOCUS_WIDGET</a>,
clipy1, clipy2);
} <span class="keywordflow">else</span> {
<a class="code" href="a00020.html#ga2c09354ec5cfdb654b09cf478e8f2399" title="Draw a widget on a window.">ctk_draw_widget</a>(widget, focus, clipy1, clipy2);
}
}
}
</pre></div><p>Where draw_window_borders() draws the window borders (also between clipy1 and clipy2). The <a class="el" href="a00020.html#ga2c09354ec5cfdb654b09cf478e8f2399" title="Draw a widget on a window.">ctk_draw_widget()</a> function is explained below. Notice how the clipy1 and clipy2 parameters are passed to all other functions; every function needs to know the boundaries within which they are allowed to draw.</p>
<p>In order to aid in implementing a ctk-draw module, a text-based ctk-draw called ctk-conio has already been implemented. It conforms to the Borland conio C library, and a skeleton implementation of said library exists in <a class="el" href="a00199_source.html">lib/libconio.c</a>. If a more machine specific ctk-draw module is to be implemented, the instructions in this file should be followed. </p>
<h3><a class="anchor" id="ctk-arch">The ctk-arch module</a></h3><p>The character used for the Return/Enter key.</p>
<p>define CH_ENTER '<br/>
'</p>
<p>The ctk-arch module deals with keyboard input from the underlying target system on which Contiki is running. The ctk-arch manages a keyboard input queue that is queried using the two functions <a class="el" href="a00020.html#ga54b6b0ef960adb9dd53af7c5b1af0968" title="Check if there is a keypress in the keyboard input queue.">ctk_arch_keyavail()</a> and <a class="el" href="a00020.html#gaba3ae4d2b9baa5953b47eeef61927398" title="Get a keypress from the keyboard input queue.">ctk_arch_getkey()</a>. </p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="gaba3ae4d2b9baa5953b47eeef61927398"></a><!-- doxytag: member="getkey.h::ctk_arch_getkey" ref="gaba3ae4d2b9baa5953b47eeef61927398" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00020.html#gaa6eb41324497b3d828d208c0efa6fa90">ctk_arch_key_t</a> ctk_arch_getkey</td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td> getkey_arch()</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get a keypress from the keyboard input queue. </p>
<p>This function will remove the first keypress in the keyboard input queue and return it. If the keyboard queue is empty, the return value is undefined. This function is intended to be used only after the <a class="el" href="a00020.html#ga54b6b0ef960adb9dd53af7c5b1af0968" title="Check if there is a keypress in the keyboard input queue.">ctk_arch_keyavail()</a> function has returned non-zero.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The first keypress from the keyboard input queue. </dd></dl>
<p>Definition at line <a class="el" href="a01470_source.html#l00049">49</a> of file <a class="el" href="a01470_source.html">getkey.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga54b6b0ef960adb9dd53af7c5b1af0968"></a><!-- doxytag: member="getkey.h::ctk_arch_keyavail" ref="ga54b6b0ef960adb9dd53af7c5b1af0968" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char ctk_arch_keyavail</td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td> keyavail_arch()</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Check if there is a keypress in the keyboard input queue. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Zero if the keyboard input queue is empty, non-zero otherwise. </dd></dl>
<p>Definition at line <a class="el" href="a01470_source.html#l00050">50</a> of file <a class="el" href="a01470_source.html">getkey.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga609601e009471eb21c7ff906358a2faf"></a><!-- doxytag: member="ctk.h::CTK_FOCUS_DIALOG" ref="ga609601e009471eb21c7ff906358a2faf" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CTK_FOCUS_DIALOG 4</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Widget focus flag: widget is in a dialog. </p>
<p>Definition at line <a class="el" href="a00142_source.html#l00985">985</a> of file <a class="el" href="a00142_source.html">ctk.h</a>.</p>
<p>Referenced by <a class="el" href="a00139_source.html#l00754">ctk_draw_dialog()</a>.</p>
</div>
</div>
<a class="anchor" id="ga8c298ccc15c01a838e11d4391629f7bf"></a><!-- doxytag: member="ctk.h::CTK_FOCUS_NONE" ref="ga8c298ccc15c01a838e11d4391629f7bf" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CTK_FOCUS_NONE 0</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Widget focus flag: no focus. </p>
<p>Definition at line <a class="el" href="a00142_source.html#l00979">979</a> of file <a class="el" href="a00142_source.html">ctk.h</a>.</p>
</div>
</div>
<a class="anchor" id="gafa49312af6ac5411ecbc0c11caa6fcf2"></a><!-- doxytag: member="ctk.h::CTK_FOCUS_WIDGET" ref="gafa49312af6ac5411ecbc0c11caa6fcf2" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CTK_FOCUS_WIDGET 1</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Widget focus flag: widget has focus. </p>
<p>Definition at line <a class="el" href="a00142_source.html#l00981">981</a> of file <a class="el" href="a00142_source.html">ctk.h</a>.</p>
<p>Referenced by <a class="el" href="a00139_source.html#l00541">ctk_draw_widget()</a>.</p>
</div>
</div>
<a class="anchor" id="gaa6bcc3324b455c546e94ba330f6c719b"></a><!-- doxytag: member="ctk.h::CTK_FOCUS_WINDOW" ref="gaa6bcc3324b455c546e94ba330f6c719b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CTK_FOCUS_WINDOW 2</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Widget focus flag: widget's window is the foremost one. </p>
<p>Definition at line <a class="el" href="a00142_source.html#l00983">983</a> of file <a class="el" href="a00142_source.html">ctk.h</a>.</p>
<p>Referenced by <a class="el" href="a01464_source.html#l00318">ctk_draw_window()</a>, and <a class="el" href="a00141_source.html#l00653">ctk_window_redraw()</a>.</p>
</div>
</div>
<a class="anchor" id="ga9e586304672935cb02e405d7efecfb5b"></a><!-- doxytag: member="ctk.h::CTK_WIDGET_BITMAP" ref="ga9e586304672935cb02e405d7efecfb5b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CTK_WIDGET_BITMAP 6</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Widget number: The CTK bitmap widget. </p>
<p>Definition at line <a class="el" href="a00142_source.html#l00075">75</a> of file <a class="el" href="a00142_source.html">ctk.h</a>.</p>
</div>
</div>
<a class="anchor" id="gae8adf9839c98a840b0b9b7c070422440"></a><!-- doxytag: member="ctk.h::CTK_WIDGET_BUTTON" ref="gae8adf9839c98a840b0b9b7c070422440" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CTK_WIDGET_BUTTON 3</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Widget number: The CTK button widget. </p>
<p>Definition at line <a class="el" href="a00142_source.html#l00069">69</a> of file <a class="el" href="a00142_source.html">ctk.h</a>.</p>
</div>
</div>
<a class="anchor" id="gad35ef85bb5562d70cee05f97968dadbc"></a><!-- doxytag: member="ctk.h::CTK_WIDGET_HYPERLINK" ref="gad35ef85bb5562d70cee05f97968dadbc" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CTK_WIDGET_HYPERLINK 4</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Widget number: The CTK hyperlink widget. </p>
<p>Definition at line <a class="el" href="a00142_source.html#l00071">71</a> of file <a class="el" href="a00142_source.html">ctk.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga392197354637697c585c8f6f618e5507"></a><!-- doxytag: member="ctk.h::CTK_WIDGET_ICON" ref="ga392197354637697c585c8f6f618e5507" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CTK_WIDGET_ICON 7</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Widget number: The CTK icon widget. </p>
<p>Definition at line <a class="el" href="a00142_source.html#l00077">77</a> of file <a class="el" href="a00142_source.html">ctk.h</a>.</p>
<p>Referenced by <a class="el" href="a00139_source.html#l00541">ctk_draw_widget()</a>.</p>
</div>
</div>
<a class="anchor" id="ga1fb739218fa5f53c992a3bcf2c7e0c57"></a><!-- doxytag: member="ctk.h::CTK_WIDGET_LABEL" ref="ga1fb739218fa5f53c992a3bcf2c7e0c57" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CTK_WIDGET_LABEL 2</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Widget number: The CTK label widget. </p>
<p>Definition at line <a class="el" href="a00142_source.html#l00067">67</a> of file <a class="el" href="a00142_source.html">ctk.h</a>.</p>
<p>Referenced by <a class="el" href="a00141_source.html#l00926">ctk_widget_add()</a>.</p>
</div>
</div>
<a class="anchor" id="ga0d2cd2b8d5b238bdeedb7a8cf5c0e58a"></a><!-- doxytag: member="ctk.h::CTK_WIDGET_SEPARATOR" ref="ga0d2cd2b8d5b238bdeedb7a8cf5c0e58a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CTK_WIDGET_SEPARATOR 1</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Widget number: The CTK separator widget. </p>
<p>Definition at line <a class="el" href="a00142_source.html#l00065">65</a> of file <a class="el" href="a00142_source.html">ctk.h</a>.</p>
<p>Referenced by <a class="el" href="a00141_source.html#l00926">ctk_widget_add()</a>.</p>
</div>
</div>
<a class="anchor" id="ga4f9b2f0c9b72be56a1aa1abab7867c2c"></a><!-- doxytag: member="ctk.h::CTK_WIDGET_TEXTENTRY" ref="ga4f9b2f0c9b72be56a1aa1abab7867c2c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CTK_WIDGET_TEXTENTRY 5</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Widget number: The CTK textentry widget. </p>
<p>Definition at line <a class="el" href="a00142_source.html#l00073">73</a> of file <a class="el" href="a00142_source.html">ctk.h</a>.</p>
</div>
</div>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="gaa6eb41324497b3d828d208c0efa6fa90"></a><!-- doxytag: member="ctk-conio.h::ctk_arch_key_t" ref="gaa6eb41324497b3d828d208c0efa6fa90" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef char <a class="el" href="a00020.html#gaa6eb41324497b3d828d208c0efa6fa90">ctk_arch_key_t</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The keyboard character type of the system. </p>
<p>The ctk_arch_key_t is usually typedef'd to the char type, but some systems (such as VNC) have a 16-bit key type. </p>
<p>Definition at line <a class="el" href="a00133_source.html#l00041">41</a> of file <a class="el" href="a00133_source.html">ctk-conio.h</a>.</p>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gae6e8805e52467b2942c2af3e0080b6e1"></a><!-- doxytag: member="ctk-draw.h::ctk_draw_clear" ref="gae6e8805e52467b2942c2af3e0080b6e1" args="(unsigned char clipy1, unsigned char clipy2)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ctk_draw_clear </td>
<td>(</td>
<td class="paramtype">unsigned char </td>
<td class="paramname"> <em>y1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned char </td>
<td class="paramname"> <em>y2</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Clear the screen between the clip bounds. </p>
<p>This function should clear the screen between the y coordinates "clipy1" and "clipy2", including the line at y coordinate "clipy1", but not the line at y coordinate "clipy2".</p>
<dl class="note"><dt><b>Note:</b></dt><dd>This function may be used to draw a background image (wallpaper) on the desktop; it does not necessarily "clear" the screen.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>clipy1</em> </td><td>The lower y coordinate of the clip region. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>clipy2</em> </td><td>The upper y coordinate of the clip region.</td></tr>
</table>
</dd>
</dl>
<p>Clear the screen between the clip bounds.</p>
<p>Called by the CTK module.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>y1</em> </td><td>The lower y coordinate bound. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>y2</em> </td><td>The upped y coordinate bound. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="a00132_source.html#l00442">442</a> of file <a class="el" href="a00132_source.html">ctk-conio.c</a>.</p>
<p>Referenced by <a class="el" href="a00132_source.html#l00075">ctk_draw_init()</a>.</p>
</div>
</div>
<a class="anchor" id="gaeade88277aa23594cd8dc9f4caeba46d"></a><!-- doxytag: member="ctk-draw.h::ctk_draw_clear_window" ref="gaeade88277aa23594cd8dc9f4caeba46d" args="(struct ctk_window *window, unsigned char focus, unsigned char clipy1, unsigned char clipy2)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ctk_draw_clear_window </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="a00038.html">ctk_window</a> * </td>
<td class="paramname"> <em>window</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned char </td>
<td class="paramname"> <em>focus</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned char </td>
<td class="paramname"> <em>clipy1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned char </td>
<td class="paramname"> <em>clipy2</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Draw the window background. </p>
<p>This function will be called by the CTK before a window will be completely redrawn.The function is supposed to draw the window background, excluding window borders as these should be drawn by the function that actually draws the window, between "clipy1" and "clipy2".</p>
<dl class="note"><dt><b>Note:</b></dt><dd>This function does not necessarily have to clear the window - it can be used for drawing a background pattern in the window as well.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>window</em> </td><td>The window for which the background should be drawn.</td></tr>
<tr><td valign="top"></td><td valign="top"><em>focus</em> </td><td>The focus of the window, either CTK_FOCUS_NONE for a background window, or CTK_FOCUS_WINDOW for the foreground window.</td></tr>
<tr><td valign="top"></td><td valign="top"><em>clipy1</em> </td><td>The lower y coordinate of the clip region. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>clipy2</em> </td><td>The upper y coordinate of the clip region.</td></tr>
</table>
</dd>
</dl>
<p>Draw the window background.</p>
<p>Called by the CTK module.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>window</em> </td><td>The window to be cleared. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>focus</em> </td><td>The focus of the window. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>clipy1</em> </td><td>The lower y coordinate bound. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>clipy2</em> </td><td>The upper y coordinate bound. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="a00132_source.html#l00266">266</a> of file <a class="el" href="a00132_source.html">ctk-conio.c</a>.</p>
<p>References <a class="el" href="a00142_source.html#l00548">ctk_window::h</a>, and <a class="el" href="a00142_source.html#l00548">ctk_window::w</a>.</p>
<p>Referenced by <a class="el" href="a01464_source.html#l00326">ctk_draw_dialog()</a>.</p>
</div>
</div>
<a class="anchor" id="gae973e0af36f51f685e88216fa10ceb56"></a><!-- doxytag: member="ctk-draw.h::ctk_draw_dialog" ref="gae973e0af36f51f685e88216fa10ceb56" args="(struct ctk_window *dialog)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ctk_draw_dialog </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="a00038.html">ctk_window</a> * </td>
<td class="paramname"> <em>dialog</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Draw a dialog onto the screen. </p>
<p>In CTK, a dialog is similar to a window, with the only exception being that they are drawn in a different style. Also, since dialogs always are drawn on top of everything else, they do not need to be drawn within any special boundaries.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>This function can usually be implemented so that it uses the same widget drawing code as the <a class="el" href="a00020.html#gae172d39b14556ee88707d4e6979abb34" title="Draw a window onto the screen.">ctk_draw_window()</a> function.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>dialog</em> </td><td>The dialog that is to be drawn.</td></tr>
</table>
</dd>
</dl>
<p>Draw a dialog onto the screen.</p>
<p>Called by the CTK module.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>dialog</em> </td><td>The dialog to be drawn. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="a00139_source.html#l00754">754</a> of file <a class="el" href="a00139_source.html">ctk-vncserver.c</a>.</p>
<p>References <a class="el" href="a00132_source.html#l00266">ctk_draw_clear_window()</a>, <a class="el" href="a00142_source.html#l00985">CTK_FOCUS_DIALOG</a>, <a class="el" href="a00142_source.html#l00548">ctk_window::h</a>, and <a class="el" href="a00142_source.html#l00548">ctk_window::w</a>.</p>
<p>Referenced by <a class="el" href="a00141_source.html#l00653">ctk_window_redraw()</a>.</p>
</div>
</div>
<a class="anchor" id="gac8b314f484f9c768f337ab2daabf9318"></a><!-- doxytag: member="ctk-draw.h::ctk_draw_height" ref="gac8b314f484f9c768f337ab2daabf9318" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">CCIF unsigned char ctk_draw_height </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Obtain the height of the VNC desktop. </p>
<p>Called by the CTK module.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The height of the VNC desktop, in characters. </dd></dl>
<p>Definition at line <a class="el" href="a00132_source.html#l00521">521</a> of file <a class="el" href="a00132_source.html">ctk-conio.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga271a33b474a94da63244e94c84127303"></a><!-- doxytag: member="ctk-draw.h::ctk_draw_init" ref="ga271a33b474a94da63244e94c84127303" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ctk_draw_init </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The initialization function. </p>
<p>This function is supposed to get the screen ready for drawing, and may be called at more than one time during the operation of the system.</p>
<p>The initialization function.</p>
<p>Called by the CTK module. </p>
<p>Definition at line <a class="el" href="a00132_source.html#l00075">75</a> of file <a class="el" href="a00132_source.html">ctk-conio.c</a>.</p>
<p>References <a class="el" href="a00132_source.html#l00442">ctk_draw_clear()</a>.</p>
</div>
</div>
<a class="anchor" id="gaa91a72c85f1c0a96ef85661b3b655067"></a><!-- doxytag: member="ctk-draw.h::ctk_draw_menus" ref="gaa91a72c85f1c0a96ef85661b3b655067" args="(struct ctk_menus *menus)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ctk_draw_menus </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="a00035.html">ctk_menus</a> * </td>
<td class="paramname"> <em>menus</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Draw the menus on the virtual VNC desktop. </p>
<p>Called by the CTK module.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>menus</em> </td><td>The CTK menubar. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="a00139_source.html#l00884">884</a> of file <a class="el" href="a00139_source.html">ctk-vncserver.c</a>.</p>
<p>References <a class="el" href="a00142_source.html#l00617">ctk_menus::desktopmenu</a>, <a class="el" href="a00142_source.html#l00611">ctk_menus::menus</a>, <a class="el" href="a00142_source.html#l00586">ctk_menu::next</a>, <a class="el" href="a00142_source.html#l00614">ctk_menus::open</a>, and <a class="el" href="a00142_source.html#l00591">ctk_menu::title</a>.</p>
</div>
</div>
<a class="anchor" id="ga2c09354ec5cfdb654b09cf478e8f2399"></a><!-- doxytag: member="ctk-draw.h::ctk_draw_widget" ref="ga2c09354ec5cfdb654b09cf478e8f2399" args="(struct ctk_widget *w, unsigned char focus, unsigned char clipy1, unsigned char clipy2)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ctk_draw_widget </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="a00036.html">ctk_widget</a> * </td>
<td class="paramname"> <em>w</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned char </td>
<td class="paramname"> <em>focus</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned char </td>
<td class="paramname"> <em>clipy1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned char </td>
<td class="paramname"> <em>clipy2</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Draw a widget on a window. </p>
<p>This function is used for drawing a CTK widgets onto the screem is likely to be the most complex function in the ctk-draw module. Still, it is straightforward to implement as it can be written in an incremental fashion, starting with a single widget type and adding more widget types, one at a time.</p>
<p>The ctk-draw module may exploit how the CTK focus constants are defined in order to use a look-up table for the colors. The CTK focus constants are defined in the file <a class="el" href="a00142.html" title="CTK header file.">ctk/ctk.h</a> as follows: </p>
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #define CTK_FOCUS_NONE 0</span>
<span class="preprocessor"></span><span class="preprocessor"> #define CTK_FOCUS_WIDGET 1</span>
<span class="preprocessor"></span><span class="preprocessor"> #define CTK_FOCUS_WINDOW 2</span>
<span class="preprocessor"> #define CTK_FOCUS_DIALOG 4</span>
</pre></div><p>This gives the following table: </p>
<div class="fragment"><pre class="fragment"> 0: <a class="code" href="a00020.html#ga8c298ccc15c01a838e11d4391629f7bf" title="Widget focus flag: no focus.">CTK_FOCUS_NONE</a> (Background window, non-focused widget)
1: <a class="code" href="a00020.html#gafa49312af6ac5411ecbc0c11caa6fcf2" title="Widget focus flag: widget has focus.">CTK_FOCUS_WIDGET</a> (Background window, focused widget)
2: <a class="code" href="a00020.html#gaa6bcc3324b455c546e94ba330f6c719b" title="Widget focus flag: widget&#39;s window is the foremost one.">CTK_FOCUS_WINDOW</a> (Foreground window, non-focused widget)
3: <a class="code" href="a00020.html#gaa6bcc3324b455c546e94ba330f6c719b" title="Widget focus flag: widget&#39;s window is the foremost one.">CTK_FOCUS_WINDOW</a> | <a class="code" href="a00020.html#gafa49312af6ac5411ecbc0c11caa6fcf2" title="Widget focus flag: widget has focus.">CTK_FOCUS_WIDGET</a>
(Foreground window, focused widget)
4: <a class="code" href="a00020.html#ga609601e009471eb21c7ff906358a2faf" title="Widget focus flag: widget is in a dialog.">CTK_FOCUS_DIALOG</a> (Dialog, non-focused widget)
5: <a class="code" href="a00020.html#ga609601e009471eb21c7ff906358a2faf" title="Widget focus flag: widget is in a dialog.">CTK_FOCUS_DIALOG</a> | <a class="code" href="a00020.html#gafa49312af6ac5411ecbc0c11caa6fcf2" title="Widget focus flag: widget has focus.">CTK_FOCUS_WIDGET</a>
(Dialog, focused widget)
</pre></div><dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>w</em> </td><td>The widget to be drawn. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>focus</em> </td><td>The focus of the widget. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>clipy1</em> </td><td>The lower y coordinate of the clip region. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>clipy2</em> </td><td>The upper y coordinate of the clip region.</td></tr>
</table>
</dd>
</dl>
<p>Draw a widget on a window.</p>
<p>Called by the CTK module.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>w</em> </td><td>The widget to be drawn. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>focus</em> </td><td>The focus of the widget. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>clipy1</em> </td><td>The lower y coordinate bound. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>clipy2</em> </td><td>The upper y coordinate bound. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="a00132_source.html#l00240">240</a> of file <a class="el" href="a00132_source.html">ctk-conio.c</a>.</p>
<p>References <a class="el" href="a00142_source.html#l00981">CTK_FOCUS_WIDGET</a>, <a class="el" href="a00142_source.html#l00077">CTK_WIDGET_ICON</a>, <a class="el" href="a00142_source.html#l00561">ctk_window::focused</a>, <a class="el" href="a00142_source.html#l00463">ctk_widget::h</a>, <a class="el" href="a00142_source.html#l00548">ctk_window::h</a>, <a class="el" href="a00142_source.html#l00455">ctk_widget::type</a>, <a class="el" href="a00142_source.html#l00463">ctk_widget::w</a>, <a class="el" href="a00142_source.html#l00548">ctk_window::w</a>, <a class="el" href="a00142_source.html#l00447">ctk_widget::window</a>, <a class="el" href="a00142_source.html#l00451">ctk_widget::x</a>, and <a class="el" href="a00142_source.html#l00451">ctk_widget::y</a>.</p>
</div>
</div>
<a class="anchor" id="ga573ade441a6b0b0ccbaf5f1ccc90fa9b"></a><!-- doxytag: member="ctk-draw.h::ctk_draw_width" ref="ga573ade441a6b0b0ccbaf5f1ccc90fa9b" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">CCIF unsigned char ctk_draw_width </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Obtain the height of the VNC desktop. </p>
<p>Called by the CTK module.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The height of the VNC desktop, in characters. </dd></dl>
<p>Definition at line <a class="el" href="a00132_source.html#l00527">527</a> of file <a class="el" href="a00132_source.html">ctk-conio.c</a>.</p>
</div>
</div>
<a class="anchor" id="gae172d39b14556ee88707d4e6979abb34"></a><!-- doxytag: member="ctk-draw.h::ctk_draw_window" ref="gae172d39b14556ee88707d4e6979abb34" args="(struct ctk_window *window, unsigned char focus, unsigned char clipy1, unsigned char clipy2, unsigned char draw_borders)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ctk_draw_window </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="a00038.html">ctk_window</a> * </td>
<td class="paramname"> <em>window</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned char </td>
<td class="paramname"> <em>focus</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned char </td>
<td class="paramname"> <em>clipy1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned char </td>
<td class="paramname"> <em>clipy2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned char </td>
<td class="paramname"> <em>draw_borders</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Draw a window onto the screen. </p>
<p>This function is called by the CTK when a window should be drawn on the screen. The ctk-draw layer is free to choose how the window will appear on screen; with or without window borders and the style of the borders, with or without transparent window background and how the background shall look, etc.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>window</em> </td><td>The window which is to be drawn.</td></tr>
<tr><td valign="top"></td><td valign="top"><em>focus</em> </td><td>Specifies if the window should be drawn in foreground or background colors and can be either CTK_FOCUS_NONE or CTK_FOCUS_WINDOW. Windows with a focus of CTK_FOCUS_WINDOW is usually drawn in a brighter color than those with CTK_FOCUS_NONE.</td></tr>
<tr><td valign="top"></td><td valign="top"><em>clipy1</em> </td><td>Specifies the first lines on screen that actually should be drawn, in screen coordinates (line 1 is the first line below the menus).</td></tr>
<tr><td valign="top"></td><td valign="top"><em>clipy2</em> </td><td>Specifies the last + 1 line on screen that should be drawn, in screen coordinates (line 1 is the first line below the menus)</td></tr>
</table>
</dd>
</dl>
<p>Draw a window onto the screen.</p>
<p>Called by the CTK module.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>window</em> </td><td>The window to be drawn. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>focus</em> </td><td>The focus of the window. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>clipy1</em> </td><td>The lower y coordinate bound. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>clipy2</em> </td><td>The upper y coordinate bound. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>draw_borders</em> </td><td>The flag for border drawing. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="a00132_source.html#l00328">328</a> of file <a class="el" href="a00132_source.html">ctk-conio.c</a>.</p>
<p>References <a class="el" href="a00142_source.html#l00983">CTK_FOCUS_WINDOW</a>, <a class="el" href="a00142_source.html#l00548">ctk_window::h</a>, <a class="el" href="a00142_source.html#l00463">ctk_widget::h</a>, <a class="el" href="a00142_source.html#l00521">ctk_window::titlelen</a>, and <a class="el" href="a00142_source.html#l00548">ctk_window::w</a>.</p>
<p>Referenced by <a class="el" href="a00141_source.html#l00653">ctk_window_redraw()</a>.</p>
</div>
</div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Mon Apr 11 14:23:51 2011 for Contiki 2.5 by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>