IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10337


Ignore:
Timestamp:
Nov 30, 2006, 5:02:01 PM (19 years ago)
Author:
eugene
Message:

add Kapa equiv functions to Kii names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libkapa/include/kapa.h

    r10320 r10337  
    44# include <X11/Xlib.h>
    55# include <png.h>
     6# include <dvo.h>
    67
    78typedef struct {
     
    135136int KapaGetSection (int fd, char *name);
    136137
     138/* KapaColors */
     139int KapaColorByName (char *name);
     140int KapaColormapSize ();
     141char *KapaColorRGBString (int N);
     142char *KapaColorName (int N);
     143png_color *KapaPNGPalette (int *Npalette);
     144unsigned long *KapaX11colors (Display *display, Colormap colormap, unsigned long default_color, int *Ncolors);
     145
     146/* RotFont.c */
     147void InitRotFonts PROTO(());
     148int SetRotFont PROTO((char *name, int size));
     149char *GetRotFont PROTO((int *size));
     150RotFont *GetRotFontData (double *scale);
     151int RotStrlen PROTO((char *c));
     152
     153/* DrawRotString.c */
     154int DrawRotText PROTO((int x, int y, char *string, int pos, double angle));
     155int DrawRotBitmap PROTO((int x, int y, int dx, int dy, unsigned char *bitmap, int mode, double angle, double scale));
     156int DrawRotTextInit (Display *display, Window window, GC gc, unsigned long fore, unsigned long back);
     157
     158
     159/* PSRotFont.c */
     160void PSRotText PROTO((FILE *f, int x, int y, char *string, int pos, double angle));
     161void PSDumpRotSegment PROTO((FILE *f, char *segment, int *Nseg));
     162void PSSetFont PROTO((FILE *f, char *name, int size));
     163
     164/* bDrawFuncs.c */
     165bDrawBuffer *bDrawBufferCreate (int Nx, int Ny);
     166void bDrawBufferFree (bDrawBuffer *buffer);
     167void bDrawSetBuffer (bDrawBuffer *buffer);
     168void bDrawSetStyle (bDrawColor color, int lw, int lt);
     169void bDrawPoint (int x, int y);
     170void bDrawPointf (float x, float y);
     171
     172void bDrawArc (double Xc, double Yc, double Xr, double Yr, double Ts, double Te);
     173void bDrawCircle (double Xc, double Yc, double radius);
     174void bDrawCircleFill (double xc, double yc, double radius);
     175
     176void bDrawLine (double x1, double y1, double x2, double y2);
     177void bDrawLineWeight (int X1, int Y1, int X2, int Y2, int swapcoords);
     178void bDrawLineBresen (int X1, int Y1, int X2, int Y2, int swapcoords);
     179void bDrawLineHorizontal (int X1, int X2, int Y);
     180void bDrawLineVertical (int X, int Y1, int Y2);
     181
     182void bDrawRectOpen (double x1, double y1, double x2, double y2);
     183void bDrawRectFill (double x1, double y1, double x2, double y2);
     184void bDrawTriOpen (double x1, double y1, double x2, double y2, double x3, double y3);
     185void bDrawTriFill (double x1, double y1, double x2, double y2, double x3, double y3);
     186
     187/* bDrawRotFont.c */
     188int bDrawRotText (int x, int y, char *string, int pos, double angle);
     189int bDrawRotBitmap (int x, int y, int dx, int dy, unsigned char *bitmap, int mode, double angle, double scale);
     190
    137191/* define Kapa names for shared functions */
    138192# define KapaOpen(p,n) KiiOpen(p,n)
     
    144198# define KapaPS(fd,s,r,f) KiiPS(fd,s,r,f)
    145199
    146 /* KapaColors */
    147 int KapaColorByName (char *name);
    148 int KapaColormapSize ();
    149 char *KapaColorRGBString (int N);
    150 char *KapaColorName (int N);
    151 png_color *KapaPNGPalette (int *Npalette);
    152 unsigned long *KapaX11colors (Display *display, Colormap colormap, unsigned long default_color, int *Ncolors);
    153 
    154 /* RotFont.c */
    155 void InitRotFonts PROTO(());
    156 int SetRotFont PROTO((char *name, int size));
    157 char *GetRotFont PROTO((int *size));
    158 RotFont *GetRotFontData (double *scale);
    159 int RotStrlen PROTO((char *c));
    160 
    161 /* DrawRotString.c */
    162 int DrawRotText PROTO((int x, int y, char *string, int pos, double angle));
    163 int DrawRotBitmap PROTO((int x, int y, int dx, int dy, unsigned char *bitmap, int mode, double angle, double scale));
    164 int DrawRotTextInit (Display *display, Window window, GC gc, unsigned long fore, unsigned long back);
    165 
    166 
    167 /* PSRotFont.c */
    168 void PSRotText PROTO((FILE *f, int x, int y, char *string, int pos, double angle));
    169 void PSDumpRotSegment PROTO((FILE *f, char *segment, int *Nseg));
    170 void PSSetFont PROTO((FILE *f, char *name, int size));
    171 
    172 /* bDrawFuncs.c */
    173 bDrawBuffer *bDrawBufferCreate (int Nx, int Ny);
    174 void bDrawBufferFree (bDrawBuffer *buffer);
    175 void bDrawSetBuffer (bDrawBuffer *buffer);
    176 void bDrawSetStyle (bDrawColor color, int lw, int lt);
    177 void bDrawPoint (int x, int y);
    178 void bDrawPointf (float x, float y);
    179 
    180 void bDrawArc (double Xc, double Yc, double Xr, double Yr, double Ts, double Te);
    181 void bDrawCircle (double Xc, double Yc, double radius);
    182 void bDrawCircleFill (double xc, double yc, double radius);
    183 
    184 void bDrawLine (double x1, double y1, double x2, double y2);
    185 void bDrawLineWeight (int X1, int Y1, int X2, int Y2, int swapcoords);
    186 void bDrawLineBresen (int X1, int Y1, int X2, int Y2, int swapcoords);
    187 void bDrawLineHorizontal (int X1, int X2, int Y);
    188 void bDrawLineVertical (int X, int Y1, int Y2);
    189 
    190 void bDrawRectOpen (double x1, double y1, double x2, double y2);
    191 void bDrawRectFill (double x1, double y1, double x2, double y2);
    192 void bDrawTriOpen (double x1, double y1, double x2, double y2, double x3, double y3);
    193 void bDrawTriFill (double x1, double y1, double x2, double y2, double x3, double y3);
    194 
    195 /* bDrawRotFont.c */
    196 int bDrawRotText (int x, int y, char *string, int pos, double angle);
    197 int bDrawRotBitmap (int x, int y, int dx, int dy, unsigned char *bitmap, int mode, double angle, double scale);
     200# define KapaClose(socket) KiiClose(socket)
     201# define KapaWait(sockpath) KiiWait(sockpath)
     202# define KapaSendCommandV(device, length, format, argp) KiiSendCommandV(device, length, format, argp)
     203# define KapaSendData(device, data, Nbytes) KiiSendData(device, data, Nbytes)
     204# define KapaRecvData(device) KiiRecvData(device)
     205
     206/* these use varargs: is this safe, or should we make a stub function? */
     207# define KapaSendMessage KiiSendMessage
     208# define KapaSendCommand KiiSendCommand
     209# define KapaScanMessage KiiScanMessage
    198210
    199211# endif
Note: See TracChangeset for help on using the changeset viewer.