1 /*
   2  * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 
  27 #ifndef __RFB_SKIN_
  28 #define __RFB_SKIN_
  29 
  30 #include <rfb/rfb.h>
  31 
  32 #ifndef PORTRFBAPI
  33 #define PORTRFBAPI extern
  34 #endif
  35 
  36 PORTRFBAPI rfbScreenInfoPtr(*_rfbGetScreen)(int *argc, char **argv,
  37                                             int width, int height, int bitsPerSample, int samplesPerPixel,
  38                                             int bytesPerPixel);
  39 #define rfbGetScreen(argc,argv,w,h,bps,spp,bpp) (*_rfbGetScreen)(argc,argv,w,h,bps,spp,bpp)
  40 
  41 PORTRFBAPI void (*_rfbInitServer)(rfbScreenInfoPtr rfbScreen);
  42 #define rfbInitServer(scr) (*_rfbInitServer)(scr)
  43 
  44 PORTRFBAPI void (*_rfbShutdownServer)(rfbScreenInfoPtr rfbScreen, rfbBool disconnectClients);
  45 #define rfbShutdownServer(scr,dis) (*_rfbShutdownServer)(scr,dis)
  46 
  47 PORTRFBAPI void (*_rfbNewFramebuffer)(rfbScreenInfoPtr rfbScreen, char *framebuffer,
  48                                       int width, int height, int bitsPerSample, int samplesPerPixel,
  49                                       int bytesPerPixel);
  50 #define rfbNewFramebuffer(scr,fb,w,h,bps,spb,bpp) (*_rfbNewFramebuffer)(scr,fb,w,h,bps,spb,bpp)
  51 
  52 PORTRFBAPI void (*_rfbRunEventLoop)(rfbScreenInfoPtr screenInfo, long usec, rfbBool runInBackground);
  53 #define rfbRunEventLoop(scr,usec,runInBackground) (*_rfbRunEventLoop)(scr,usec,runInBackground)
  54 
  55 PORTRFBAPI void (*_rfbMarkRectAsModified)(rfbScreenInfoPtr rfbScreen, int x1, int y1, int x2, int y2);
  56 #define rfbMarkRectAsModified(scr,x1,y1,x2,y2) (*_rfbMarkRectAsModified)(scr,x1,y1,x2,y2)
  57 
  58 PORTRFBAPI rfbBool(*_rfbProcessEvents)(rfbScreenInfoPtr screenInfo, long usec);
  59 #define rfbProcessEvents(scr,usec) (*_rfbProcessEvents)(scr,usec)
  60 
  61 PORTRFBAPI rfbBool(*_rfbIsActive)(rfbScreenInfoPtr screenInfo);
  62 #define rfbIsActive(scr) (*_rfbIsActive)(scr)
  63 #endif
  64