Lines Matching refs:cl
30 static rfbBool rfbSetClientColourMapBGR233(rfbClientPtr cl);
245 rfbSetTranslateFunction(rfbClientPtr cl) in rfbSetTranslateFunction() argument
247 rfbLog("Pixel format for client %s:\n",cl->host); in rfbSetTranslateFunction()
248 PrintPixelFormat(&cl->format); in rfbSetTranslateFunction()
254 if ((cl->screen->serverFormat.bitsPerPixel != 8) && in rfbSetTranslateFunction()
255 (cl->screen->serverFormat.bitsPerPixel != 16) && in rfbSetTranslateFunction()
257 (cl->screen->serverFormat.bitsPerPixel != 24) && in rfbSetTranslateFunction()
259 (cl->screen->serverFormat.bitsPerPixel != 32)) in rfbSetTranslateFunction()
263 cl->screen->serverFormat.bitsPerPixel); in rfbSetTranslateFunction()
264 rfbCloseClient(cl); in rfbSetTranslateFunction()
268 if ((cl->format.bitsPerPixel != 8) && in rfbSetTranslateFunction()
269 (cl->format.bitsPerPixel != 16) && in rfbSetTranslateFunction()
271 (cl->format.bitsPerPixel != 24) && in rfbSetTranslateFunction()
273 (cl->format.bitsPerPixel != 32)) in rfbSetTranslateFunction()
277 rfbCloseClient(cl); in rfbSetTranslateFunction()
281 if (!cl->format.trueColour && (cl->format.bitsPerPixel != 8)) { in rfbSetTranslateFunction()
284 cl->format.bitsPerPixel); in rfbSetTranslateFunction()
285 rfbCloseClient(cl); in rfbSetTranslateFunction()
293 if (!cl->format.trueColour) { in rfbSetTranslateFunction()
301 if (!rfbSetClientColourMapBGR233(cl)) in rfbSetTranslateFunction()
304 cl->format = BGR233Format; in rfbSetTranslateFunction()
309 if (PF_EQ(cl->format,cl->screen->serverFormat)) { in rfbSetTranslateFunction()
314 cl->translateFn = rfbTranslateNone; in rfbSetTranslateFunction()
318 if ((cl->screen->serverFormat.bitsPerPixel < 16) || in rfbSetTranslateFunction()
319 ((!cl->screen->serverFormat.trueColour || !rfbEconomicTranslate) && in rfbSetTranslateFunction()
320 (cl->screen->serverFormat.bitsPerPixel == 16))) { in rfbSetTranslateFunction()
324 cl->translateFn = rfbTranslateWithSingleTableFns in rfbSetTranslateFunction()
325 [BPP2OFFSET(cl->screen->serverFormat.bitsPerPixel)] in rfbSetTranslateFunction()
326 [BPP2OFFSET(cl->format.bitsPerPixel)]; in rfbSetTranslateFunction()
328 if(cl->screen->serverFormat.trueColour) in rfbSetTranslateFunction()
330 [BPP2OFFSET(cl->format.bitsPerPixel)]) (&cl->translateLookupTable, in rfbSetTranslateFunction()
331 &(cl->screen->serverFormat), &cl->format); in rfbSetTranslateFunction()
334 [BPP2OFFSET(cl->format.bitsPerPixel)]) (&cl->translateLookupTable, in rfbSetTranslateFunction()
335 &(cl->screen->serverFormat), &cl->format,&cl->screen->colourMap); in rfbSetTranslateFunction()
341 cl->translateFn = rfbTranslateWithRGBTablesFns in rfbSetTranslateFunction()
342 [BPP2OFFSET(cl->screen->serverFormat.bitsPerPixel)] in rfbSetTranslateFunction()
343 [BPP2OFFSET(cl->format.bitsPerPixel)]; in rfbSetTranslateFunction()
346 [BPP2OFFSET(cl->format.bitsPerPixel)]) (&cl->translateLookupTable, in rfbSetTranslateFunction()
347 &(cl->screen->serverFormat), &cl->format); in rfbSetTranslateFunction()
361 rfbSetClientColourMapBGR233(rfbClientPtr cl) in rfbSetClientColourMapBGR233() argument
369 if (cl->format.bitsPerPixel != 8 ) { in rfbSetClientColourMapBGR233()
372 rfbCloseClient(cl); in rfbSetClientColourMapBGR233()
397 if (rfbWriteExact(cl, buf, len) < 0) { in rfbSetClientColourMapBGR233()
399 rfbCloseClient(cl); in rfbSetClientColourMapBGR233()
415 rfbSetClientColourMap(rfbClientPtr cl, int firstColour, int nColours) in rfbSetClientColourMap() argument
417 if (cl->screen->serverFormat.trueColour || !cl->readyForSetColourMapEntries) { in rfbSetClientColourMap()
422 nColours = cl->screen->colourMap.count; in rfbSetClientColourMap()
425 if (cl->format.trueColour) { in rfbSetClientColourMap()
426 LOCK(cl->updateMutex); in rfbSetClientColourMap()
428 [BPP2OFFSET(cl->format.bitsPerPixel)]) (&cl->translateLookupTable, in rfbSetClientColourMap()
429 &cl->screen->serverFormat, &cl->format,&cl->screen->colourMap); in rfbSetClientColourMap()
431 sraRgnDestroy(cl->modifiedRegion); in rfbSetClientColourMap()
432 cl->modifiedRegion = in rfbSetClientColourMap()
433 sraRgnCreateRect(0,0,cl->screen->width,cl->screen->height); in rfbSetClientColourMap()
434 UNLOCK(cl->updateMutex); in rfbSetClientColourMap()
439 return rfbSendSetColourMapEntries(cl, firstColour, nColours); in rfbSetClientColourMap()
451 rfbClientPtr cl; in rfbSetClientColourMaps() local
454 while((cl = rfbClientIteratorNext(i))) in rfbSetClientColourMaps()
455 rfbSetClientColourMap(cl, firstColour, nColours); in rfbSetClientColourMaps()