Changeset 10337
- Timestamp:
- Nov 30, 2006, 5:02:01 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/libkapa/include/kapa.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libkapa/include/kapa.h
r10320 r10337 4 4 # include <X11/Xlib.h> 5 5 # include <png.h> 6 # include <dvo.h> 6 7 7 8 typedef struct { … … 135 136 int KapaGetSection (int fd, char *name); 136 137 138 /* KapaColors */ 139 int KapaColorByName (char *name); 140 int KapaColormapSize (); 141 char *KapaColorRGBString (int N); 142 char *KapaColorName (int N); 143 png_color *KapaPNGPalette (int *Npalette); 144 unsigned long *KapaX11colors (Display *display, Colormap colormap, unsigned long default_color, int *Ncolors); 145 146 /* RotFont.c */ 147 void InitRotFonts PROTO(()); 148 int SetRotFont PROTO((char *name, int size)); 149 char *GetRotFont PROTO((int *size)); 150 RotFont *GetRotFontData (double *scale); 151 int RotStrlen PROTO((char *c)); 152 153 /* DrawRotString.c */ 154 int DrawRotText PROTO((int x, int y, char *string, int pos, double angle)); 155 int DrawRotBitmap PROTO((int x, int y, int dx, int dy, unsigned char *bitmap, int mode, double angle, double scale)); 156 int DrawRotTextInit (Display *display, Window window, GC gc, unsigned long fore, unsigned long back); 157 158 159 /* PSRotFont.c */ 160 void PSRotText PROTO((FILE *f, int x, int y, char *string, int pos, double angle)); 161 void PSDumpRotSegment PROTO((FILE *f, char *segment, int *Nseg)); 162 void PSSetFont PROTO((FILE *f, char *name, int size)); 163 164 /* bDrawFuncs.c */ 165 bDrawBuffer *bDrawBufferCreate (int Nx, int Ny); 166 void bDrawBufferFree (bDrawBuffer *buffer); 167 void bDrawSetBuffer (bDrawBuffer *buffer); 168 void bDrawSetStyle (bDrawColor color, int lw, int lt); 169 void bDrawPoint (int x, int y); 170 void bDrawPointf (float x, float y); 171 172 void bDrawArc (double Xc, double Yc, double Xr, double Yr, double Ts, double Te); 173 void bDrawCircle (double Xc, double Yc, double radius); 174 void bDrawCircleFill (double xc, double yc, double radius); 175 176 void bDrawLine (double x1, double y1, double x2, double y2); 177 void bDrawLineWeight (int X1, int Y1, int X2, int Y2, int swapcoords); 178 void bDrawLineBresen (int X1, int Y1, int X2, int Y2, int swapcoords); 179 void bDrawLineHorizontal (int X1, int X2, int Y); 180 void bDrawLineVertical (int X, int Y1, int Y2); 181 182 void bDrawRectOpen (double x1, double y1, double x2, double y2); 183 void bDrawRectFill (double x1, double y1, double x2, double y2); 184 void bDrawTriOpen (double x1, double y1, double x2, double y2, double x3, double y3); 185 void bDrawTriFill (double x1, double y1, double x2, double y2, double x3, double y3); 186 187 /* bDrawRotFont.c */ 188 int bDrawRotText (int x, int y, char *string, int pos, double angle); 189 int bDrawRotBitmap (int x, int y, int dx, int dy, unsigned char *bitmap, int mode, double angle, double scale); 190 137 191 /* define Kapa names for shared functions */ 138 192 # define KapaOpen(p,n) KiiOpen(p,n) … … 144 198 # define KapaPS(fd,s,r,f) KiiPS(fd,s,r,f) 145 199 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 198 210 199 211 # endif
Note:
See TracChangeset
for help on using the changeset viewer.
