1cdk_objs(3) Library Functions Manual cdk_objs(3)
2
3
4
6 cdk_objs - Cdk object-support functions
7
9 cc [ flag ... ] file ... -lcdk [ library ... ]
10
11 void cleanCdkTitle (
12 CDKOBJS *obj);
13
14 void drawCdkTitle (
15 WINDOW *window,
16 CDKOBJS *object);
17
18 void positionCDKObject (
19 CDKOBJS *object,
20 WINDOW *win);
21
22 void setCDKObjectBackgroundColor (
23 CDKOBJS *object,
24 const 3char *color);
25
26 void setCDKObjectPostProcess (
27 CDKOBJS *object,
28 PROCESSFN func,
29 void *data);
30
31 void setCDKObjectPreProcess (
32 CDKOBJS *object,
33 PROCESSFN func,
34 void *data);
35
36 void setCdkExitType(
37 CDKOBJS *obj,
38 EExitType *type,
39 chtyp ch);
40
41 int setCdkTitle (
42 CDKOBJS *obj,
43 const char *title,
44 int boxWidth);
45
46 bool validCDKObject (
47 CDKOBJS *obj);
48
50 Cdk is written in ANSI C, which has "no" object support. Most of the
51 object support in Cdk is done using macros and a small number of types
52 which hold object information:
53
54 CDKFUNCS
55 contains the function pointers for common methods of the wid‐
56 gets. It is separate from CDKOBJS because it is compiled
57 into each widget's C code (see the DeclareCDKObjects() and
58 DeclareSetXXchar() macros. The widget instances point to a
59 single copy of CDKFUNCS for each widget.
60
61 CDKOBJS
62 Holds data common to all objects (widget instances). It
63 appears first in each widget's struct to allow Cdk to use
64 generic functions in binding.c, cdkscreen.c, position.c, etc.
65
66
68 The functions declared in <cdk/cdk_objs.h> are used in situations where
69 the expressions are too complex for a macro.
70
71 cleanCdkTitle
72 Remove storage for the widget's title.
73
74 drawCdkTitle,
75 Draw the widget's title.
76
77 positionCDKObject
78 This allows the user to use the cursor keys to adjust the position
79 of the widget.
80
81 setCDKObjectBackgroundColor
82 Set the background color of the widget.
83
84 setCDKObjectPostProcess
85 Set data for postprocessing.
86
87 setCDKObjectPreProcess
88 Set data for preprocessing.
89
90 setCdkExitType
91 Set the object's exit-type based on the input. The .exitType
92 field should have been part of the CDKOBJS struct, but it is used
93 too pervasively in Cdk4 applications to move.
94
95 setCdkTitle
96 Set the widget's title.
97
98 validCDKObject
99 Returns true if a "new" was done on the object but no "destroy".
100
102 cdk_binding (3) cdk_process (3)
103
104
105
106 cdk_objs(3)