Lines Matching refs:opts

88     if (view->opts.cmap==None)
89 view->opts.cmap= DefaultColormap(dpy,DefaultScreen(dpy));
96 if (XAllocNamedColor(view->dpy,view->opts.cmap,spec,&sdef,&xdef)) {
108 if (XAllocNamedColor(view->dpy,view->opts.cmap,buf,&sdef,&xdef)) {
117 xkb->geom->colors[i].pixel= view->opts.fg;
130 XkbUI_ViewOptsPtr opts)
145 view->opts= dfltOpts;
146 view->opts.fg= WhitePixel(dpy,scrn);
147 view->opts.bg= BlackPixel(dpy,scrn);
148 view->opts.viewport.x= 0;
149 view->opts.viewport.y= 0;
150 view->opts.viewport.width= width;
151 view->opts.viewport.height= height;
152 if ((opts)&&(opts->present)) {
153 if (opts->present&XkbUI_BackgroundMask)
154 view->opts.bg= opts->bg;
155 if (opts->present&XkbUI_ForegroundMask)
156 view->opts.fg= opts->fg;
157 if (opts->present&XkbUI_LabelModeMask)
158 view->opts.label_mode= opts->label_mode;
159 if (opts->present&XkbUI_ColorModeMask)
160 view->opts.color_mode= opts->color_mode;
161 if (opts->present&XkbUI_WidthMask)
162 view->opts.viewport.width= opts->viewport.width;
163 if (opts->present&XkbUI_HeightMask)
164 view->opts.viewport.height= opts->viewport.height;
165 if (opts->present&XkbUI_XOffsetMask)
166 view->opts.viewport.x= opts->viewport.x;
167 if (opts->present&XkbUI_YOffsetMask)
168 view->opts.viewport.y= opts->viewport.y;
169 if (opts->present&XkbUI_MarginWidthMask)
170 view->opts.margin_width= opts->margin_width;
171 if (opts->present&XkbUI_MarginHeightMask)
172 view->opts.margin_height= opts->margin_height;
173 if (opts->present&XkbUI_ColormapMask)
174 view->opts.cmap= opts->cmap;
176 view->canvas_width= width+(2*view->opts.margin_width);
177 view->canvas_height= height+(2*view->opts.margin_height);
178 if (view->opts.viewport.width>view->canvas_width) {
180 tmp= (view->opts.viewport.width-view->canvas_width)/2;
181 view->opts.margin_width+= tmp;
183 if (view->opts.viewport.height>view->canvas_height) {
185 tmp= (view->opts.viewport.height-view->canvas_height)/2;
186 view->opts.margin_height+= tmp;
190 xgcv.foreground= view->opts.fg;
191 xgcv.background= view->opts.bg;
201 XkbUI_SetViewOpts(XkbUI_ViewPtr view,XkbUI_ViewOptsPtr opts)
203 if ((!view)||(!opts))
205 if (opts->present==0)
207 if (opts->present&XkbUI_BackgroundMask)
208 view->opts.bg= opts->bg;
209 if (opts->present&XkbUI_ForegroundMask)
210 view->opts.fg= opts->fg;
211 if (opts->present&XkbUI_LabelModeMask)
212 view->opts.label_mode= opts->label_mode;
213 if (opts->present&XkbUI_ColorModeMask)
214 view->opts.color_mode= opts->color_mode;
215 if (opts->present&XkbUI_WidthMask)
216 view->opts.viewport.width= opts->viewport.width;
217 if (opts->present&XkbUI_HeightMask)
218 view->opts.viewport.height= opts->viewport.height;
219 if (opts->present&XkbUI_XOffsetMask)
220 view->opts.viewport.x= opts->viewport.x;
221 if (opts->present&XkbUI_YOffsetMask)
222 view->opts.viewport.y= opts->viewport.y;
223 if (opts->present&XkbUI_MarginWidthMask)
224 view->opts.margin_width= opts->margin_width;
225 if (opts->present&XkbUI_MarginHeightMask)
226 view->opts.margin_height= opts->margin_height;
227 if (opts->present&XkbUI_ColormapMask) {
228 view->opts.cmap= opts->cmap;
239 *opts_rtrn= view->opts;
296 xpts[i].x+= view->opts.viewport.x;
299 xpts[i].y+= view->opts.viewport.y;
316 xpts[i].x+= view->opts.viewport.x;
319 xpts[i].y+= view->opts.viewport.y;