File: cdk_screen.3

package info (click to toggle)
libcdk5 5.0.20161210-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,440 kB
  • ctags: 2,833
  • sloc: ansic: 32,375; sh: 4,732; makefile: 1,122; sed: 43; cpp: 41
file content (150 lines) | stat: -rw-r--r-- 3,931 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
.\" $Id: cdk_screen.3,v 1.9 2016/12/04 16:17:40 tom Exp $
.\" Bulleted paragraph
.de bP
.IP \(bu 4
..
.de XX
..
.TH cdk_screen 3
.SH NAME
.XX destroyCDKScreen
.XX endCDK
.XX eraseCDKScreen
.XX initCDKColor
.XX initCDKScreen
.XX lowerCDKObject
.XX raiseCDKObject
.XX refreshCDKScreen
.XX registerCDKObject
.XX unregisterCDKObject
cdk_screen \- Cdk Screen and Widget Manipulation Functions
.SH SYNOPSIS
.LP
.B cc
.RI "[ " "flag" " \|.\|.\|. ] " "file" " \|.\|.\|."
.B \-lcdk
.RI "[ " "library" " \|.\|.\|. ]"
.LP
#include <cdk.h>
.nf
.TP 15
.B "void destroyCDKScreen("
.BI "CDKSCREEN *" "screen");
.TP 15
.B "void endCDK(void)";
.TP 15
.B "void eraseCDKScreen("
.BI "CDKSCREEN *" "screen");
.TP 15
.B "void initCDKColor (void)";
.TP 15
.B "CDKSCREEN *initCDKScreen ("
.BI "WINDOW *" "cursesWindow");
.TP 15
.B "void lowerCDKObject("
.BI "EObjectType " "widgetType",
.BI "void *" "object");
.TP 15
.B "void raiseCDKObject("
.BI "EObjectType " "widgetType",
.BI "void *" "object");
.TP 15
.B "void refreshCDKScreen("
.BI "CDKSCREEN *" "screen");
.TP 15
.B "void registerCDKObject ("
.BI "CDKSCREEN *" "screen",
.BI "EObjectType " "widgetType",
.BI "void *" "object");
.TP 15
.B "void unregisterCDKObject("
.BI "EObjectType " "widgetType",
.BI "void *" "object");
.fi
.SH DESCRIPTION
Cdk manages all of the widgets for you.
These functions perform some of the management of the widgets in a screen.
.SH AVAILABLE FUNCTIONS
.TP 5
.B destroyCDKScreen
frees any memory allocated by the Cdk screen pointer.
.TP 5
.B endCDK
cleans up any memory created by starting Cdk and shuts down curses.
.TP 5
.B eraseCDKScreen
erases all of the widgets which are currently associated to the
given screen.
This does \fBNOT\fR destroy the widgets.
.TP 5
.B initCDKColor
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.
.TP 5
.B initCDKScreen
takes a \fBWINDOW*\fR parameter \fIcursesWindow\fR and returns a
pointer to a \fBCDKSCREEN\fR.
.IP
Since all of the widgets take a
\fBCDKSCREEN\fR pointer as a first argument,
this is one of the first calls made.
.IP
If the \fIcursesWindow\fP parameter is a null pointer,
\fBinitCDKScreen\fP initializes curses and
replaces the parameter with \fBstdscr\fP.
Otherwise, it assumes that your application has already
initialized the locale and then called \fBinitscr\fP
.IP
In either case, the (possibly updated) \fIcursesWindow\fP parameter is
used as the window for the \fBCDKSCREEN\fP result.
.TP 5
.B lowerCDKObject
has the opposite effect of the \fBraiseCDKObject\fR function call.
.TP 5
.B raiseCDKObject
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.
.RS
.bP
The \fIwidgetType\fR parameter states what Cdk widget type this object is.
.bP
The \fIobject\fR parameter is a void pointer to the object.
.RE
.TP 5
.B refreshCDKScreen
redraws all of the widgets which are currently associated to the
given screen.
.TP 5
.B registerCDKObject
is called automatically when a widget is created.
If for some
reason an object does get unregistered, by calling \fBunregisterCDKObject\fR,
the widget can be registered again by calling this function.
.RS
.bP
The \fIwidgetType\fR parameter states what Cdk widget type this object is.
.bP
The \fIobject\fR parameter is a void pointer to the object.
.RE
.TP 5
.B unregisterCDKObject
removes the widget from the screen.
This does \fBNOT\fR destroy
the object, it removes the widget from any further refreshes by the function
\fBrefreshCDKScreen\fR.
.RS
.bP
The \fIwidgetType\fR parameter states what Cdk widget
type this object is.
.bP
The \fIobject\fR parameter is a void pointer to the object.
.RE
.SH SEE ALSO
.BR cdk (3),
.BR cdk_binding (3),
.BR cdk_display (3)