1cdk_screen(3) Library Functions Manual cdk_screen(3)
2
3
4
6 cdk_screen - Cdk Screen and Widget Manipulation Functions
7
9 cc [ flag ... ] file ... -lcdk [ library ... ]
10
11 #include <cdk.h>
12
13 void destroyCDKScreen(
14 CDKSCREEN *screen);
15
16 void endCDK(void) ;
17
18 void eraseCDKScreen(
19 CDKSCREEN *screen);
20
21 void initCDKColor (void) ;
22
23 CDKSCREEN *initCDKScreen (
24 WINDOW *cursesWindow);
25
26 void lowerCDKObject(
27 EObjectType widgetType,
28 void *object);
29
30 void raiseCDKObject(
31 EObjectType widgetType,
32 void *object);
33
34 void refreshCDKScreen(
35 CDKSCREEN *screen);
36
37 void registerCDKObject (
38 CDKSCREEN *screen,
39 EObjectType widgetType,
40 void *object);
41
42 void unregisterCDKObject(
43 EObjectType widgetType,
44 void *object);
45
47 Cdk manages all of the widgets for you. These functions perform some
48 of the management of the widgets in a screen.
49
51 destroyCDKScreen
52 frees any memory allocated by the Cdk screen pointer.
53
54 endCDK
55 cleans up any memory created by starting Cdk and shuts down
56 curses.
57
58 eraseCDKScreen
59 erases all of the widgets which are currently associated to the
60 given screen. This does NOT destroy the widgets.
61
62 initCDKColor
63 starts the Cdk color capabilities. It defines 64 color pairs each
64 of which is accessible using the COLOR_PAIR macro. If you do not
65 have color support, this function call makes no difference.
66
67 initCDKScreen
68 takes a WINDOW* parameter cursesWindow and returns a pointer to a
69 CDKSCREEN.
70
71 Since all of the widgets take a CDKSCREEN pointer as a first argu‐
72 ment, this is one of the first calls made.
73
74 If the cursesWindow parameter is a null pointer, initCDKScreen
75 initializes curses and replaces the parameter with stdscr. Other‐
76 wise, it assumes that your application has already initialized the
77 locale and then called initscr
78
79 In either case, the (possibly updated) cursesWindow parameter is
80 used as the window for the CDKSCREEN result.
81
82 lowerCDKObject
83 has the opposite effect of the raiseCDKObject function call.
84
85 raiseCDKObject
86 raises the widget to the top of the screen. If there are any wid‐
87 gets which overlap the given object when a refresh is done, call‐
88 ing this function has the effect of raiding the object so no other
89 widgets obstruct it.
90
91 · The widgetType parameter states what Cdk widget type this
92 object is.
93
94 · The object parameter is a void pointer to the object.
95
96 refreshCDKScreen
97 redraws all of the widgets which are currently associated to the
98 given screen.
99
100 registerCDKObject
101 is called automatically when a widget is created. If for some
102 reason an object does get unregistered, by calling unregisterCD‐
103 KObject, the widget can be registered again by calling this func‐
104 tion.
105
106 · The widgetType parameter states what Cdk widget type this
107 object is.
108
109 · The object parameter is a void pointer to the object.
110
111 unregisterCDKObject
112 removes the widget from the screen. This does NOT destroy the
113 object, it removes the widget from any further refreshes by the
114 function refreshCDKScreen.
115
116 · The widgetType parameter states what Cdk widget type this
117 object is.
118
119 · The object parameter is a void pointer to the object.
120
122 cdk(3), cdk_binding(3), cdk_display(3)
123
124
125
126 cdk_screen(3)