File: cdk_screen.3

package info (click to toggle)
libcdk 4.9.9-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,876 kB
  • ctags: 2,249
  • sloc: ansic: 28,664; sh: 6,966; makefile: 211; cpp: 42
file content (136 lines) | stat: -rw-r--r-- 4,609 bytes parent folder | download | duplicates (2)
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
.de It
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH cdk_screen 3X "05 Dec 1995"
.SH NAME
initCDKScreen, initCDKColor, registerCDKObject, unregisterCDKObject,
raiseCDKObject, lowerCDKObject, refreshCDKScreen, eraseCDKScreen,
destroyCDKScreen, endCDK - Cdk Screen and Widget Manipulation Functions
.SH SYNOPSIS
.LP
.B cc
.RI "[ " "flag" " \|.\|.\|. ] " "file" " \|.\|.\|."
.B \-lcdk
.RI "[ " "library" " \|.\|.\|. ]"
.LP
#include <cdk.h>
.LP
.BI "CDKSCREEN *initCDKScreen (WINDOW *" "cursesWindow ");
.LP
.BI "void initCDKColor ()";
.LP
.BI "void registerCDKObject (CDKSCREEN *" "screen ",
.BI "EObjectType " "widgetType ",
.BI "void *" "object");
.LP
.BI "void unregisterCDKObject(EObjectType " "widgetType ",
.BI "void *" "object");
.LP
.BI "void raiseCDKObject(EObjectType " "widgetType ",
.BI "void *" "object");
.LP
.BI "void lowerCDKObject(EObjectType " "widgetType ",
.BI "void *" "object");
.LP
.BI "void refreshCDKScreen(CDKSCREEN *" "screen");
.LP
.BI "void eraseCDKScreen(CDKSCREEN *" "screen");
.LP
.BI "void destroyCDKScreen(CDKSCREEN *" "screen");
.LP
.BI "void endCDK()";
.LP
.SH DESCRIPTION
One of the features of Cdk is that it will manage all of the widgets for you.
These functions perform some of the management of the widgets in a screen. The
following outline each function and it's purpose.

.SH AVAILABLE FUNCTIONS
CDKSCREEN *initCDKScreen (WINDOW *\f2cursesWindow\f1);
.RS 3
This function takes a \f4WINDOW *\f1 (\f2cursesWindow\f1) and returns a 
pointer to a \f4CDKSCREEN *\f1. Since all of the widgets take a 
\f4CDKSCREEN\f1 pointer as a first argument, this is also one of the first 
calls made. This also starts curses, so no curses initialization calls have 
to be made when using Cdk.
.RE

void initCDKColor ();
.RS 3
This call starts the Cdk color capabilities. It defines 64 color pairs each
of which is accessible using the COLOR_PAIR macro. If you do not have color
support, this function call makes no difference.
.RE

void registerCDKObject (CDKSCREEN *\f2screen\f1, EObjectType \f2widgetType\f1, void *\f2object\f1);
.RS 3
This function is called automatically when a widget is created. If for some
reason an object does get unregistered, by calling \f4unregisterCDKObject\f1, 
the widget can be registered again by calling this function. The 
\f2widgetType\f1 parameter states what Cdk widget type this object is. The 
\f2object\f1 parameter is a void pointer to the object.
.RE

void unregisterCDKObject (EObjectType \f2cdktype\f1, void *\f2object\f1);
.RS 3
This function removes the widget from the screen. This does \f4NOT\f1 destroy 
the object, it removes the widget from any further refreshes by the function
\f4refreshCDKScreen\f1. The \f2widgetType\f1 parameter states what Cdk widget
type this object is. The \f2object\f1 parameter is a void pointer to the 
object.
.RE

void raiseCDKObject (EObjectType \f2cdktype\f1, void *\f2object\f1);
.RS 3
This function raises the widget to the top of the screen. If there are any 
widgets which overlap the given object when a refresh is done, calling this
function has the effect of raiding the object so no other widgets obstruct 
it. The \f2widgetType\f1 parameter states what Cdk widget type this object is.
The \f2object\f1 parameter is a void pointer to the object.
.RE

void lowerCDKObject (EObjectType \f2cdktype\f1, void *\f2object\f1);
.RS
This function has the opposite effect of the \f4raiseCDKObject\f1 function
call.
.RE

void refreshCDKScreen (CDKSCREEN *\f2screen\f1);
.RS 3
This function redraws all of the widgets which are currently associated to the
given screen.
.RE

void eraseCDKScreen (CDKSCREEN *\f2screen\f1);
.RS 3
This function erases all of the widgets which are currently associated to the
given screen. This does \f4NOT\f1 destroy the widgets.
.RE

void destroyCDKScreen (CDKSCREEN *\f2screen\f1);
.RS 3
This function destroys any memory allocated by the Cdk screen pointer.
.RE

void endCDK();
.RS 3
This function cleans up any memory created by starting Cdk and shuts down 
curses.
.RE
.SH SEE ALSO
.BR cdk (3X),
.BR cdk_binding (3X),
.BR cdk_display (3X)
.SH NOTES
.PP
The header file \f4<cdk.h>\f1 automatically includes the header files
\f4<curses.h>\f1, \f4<stdlib.h>\f1, \f4<string.h>\f1, \f4<ctype.h>\f1,
\f4<unistd.h>\f1, \f4<dirent.h>\f1, \f4<time.h>\f1, \f4<errno.h>\f1,
\f4<pwd.h>\f1, \f4<grp.h>\f1, \f4<sys/stat.h>\f1, and \f4<sys/types.h>\f1.
The \f4<curses.h>\f1 header file includes \f4<stdio.h>\f1 and \f4<unctrl.h>\f1.
.PP
If you have \f4Ncurses\f1 installed on your machine add -DNCURSES to the 
compile line to include the Ncurses header files instead.