Changeset 14590 for trunk/Ohana/src/kapa2
- Timestamp:
- Aug 21, 2007, 2:10:20 PM (19 years ago)
- Location:
- trunk/Ohana/src/kapa2
- Files:
-
- 20 edited
-
include/icons.h (modified) (3 diffs)
-
include/prototypes.h (modified) (3 diffs)
-
include/structures.h (modified) (1 diff)
-
src/CheckGeometry.c (modified) (1 diff)
-
src/CheckPipe.c (modified) (1 diff)
-
src/CreateZoom8.c (modified) (1 diff)
-
src/DefineSection.c (modified) (1 diff)
-
src/DrawButton.c (modified) (1 diff)
-
src/EraseImage.c (modified) (1 diff)
-
src/EraseOverlay.c (modified) (1 diff)
-
src/EventLoop.c (modified) (1 diff)
-
src/GetPixelCount.c (modified) (1 diff)
-
src/InterpretKeys.c (modified) (2 diffs)
-
src/InterpretPresses.c (modified) (1 diff)
-
src/JPEGit24.c (modified) (1 diff)
-
src/LoadFrame.c (modified) (1 diff)
-
src/LoadObject.c (modified) (1 diff)
-
src/LoadOverlay.c (modified) (1 diff)
-
src/SetImageData.c (modified) (2 diffs)
-
src/SetImageSize.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/kapa2/include/icons.h
r13320 r14590 1 2 #define icon_width 29 3 #define icon_height 29 4 static unsigned char icon_bits[] = { 5 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x07, 6 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 7 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0xfc, 0xff, 0xff, 0x07, 8 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 9 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0xfc, 0xff, 0xff, 0x07, 10 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 11 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0xfc, 0xff, 0xff, 0x07, 12 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 13 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0xfc, 0xff, 0xff, 0x07, 14 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; 15 16 /* *** icons for buttons, not used *** 1 17 #define arrow_width 6 2 18 #define arrow_height 9 … … 19 35 0xfc, 0x0f, 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x0f, 0xfc, 0x03, 0xfc, 0x00, 20 36 0x3c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00}; 21 #define icon_width 2922 #define icon_height 2923 static unsigned char icon_bits[] = {24 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x07,25 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04,26 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0xfc, 0xff, 0xff, 0x07,27 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04,28 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0xfc, 0xff, 0xff, 0x07,29 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04,30 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0xfc, 0xff, 0xff, 0x07,31 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04,32 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0xfc, 0xff, 0xff, 0x07,33 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};34 37 #define stop_width 16 35 38 #define stop_height 16 … … 38 41 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 39 42 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; 43 */ -
trunk/Ohana/src/kapa2/include/prototypes.h
r14500 r14590 23 23 void NameWindow PROTO((Graphic *graphic, char *name)); 24 24 void MapWindow PROTO((Graphic *graphic)); 25 void CheckVisual (Graphic *graphic, int *argc, char **argv); 25 26 26 27 /* X drawing utilities */ … … 85 86 int SetActiveSectionByNumber PROTO((int N)); 86 87 int ListSection PROTO((int sock)); 88 void SetSectionSizes (Section *section); 87 89 88 90 KapaGraphWidget *InitGraph PROTO(()); … … 188 190 int Overlay3 PROTO((Graphic *graphic, KapaImageWidget *image)); 189 191 int PSfunction PROTO((Graphic *graphic, KapaImageWidget *image)); 192 193 /* misc functions */ 194 void SetToolbox (int sock); 195 int EraseOverlay (int sock); 196 int LoadOverlay (int sock); 197 int SaveOverlay (int sock); 198 int CSaveOverlay (int sock); 199 int JPEGit24 (int sock); 200 201 int UpdatePointer (Graphic *graphic, XMotionEvent *event); 202 int InterpretPresses (Graphic *graphic, XButtonEvent *event); 203 int InterpretKeys (Graphic *graphic, XKeyEvent *event); 204 void InitPipe (char *namedSocket); 205 void EraseGraph (KapaGraphWidget *graph); 206 void StatusBox (Graphic *graphic, KapaImageWidget *image); 207 208 void CreatePicture (KapaImageWidget *image, Graphic *graphic); 209 void CreateColorbar (KapaImageWidget *image, Graphic *graphic); 210 void CreateZoom (KapaImageWidget *image, Graphic *graphic, double x, double y); 211 void UpdateStatusBox (Graphic *graphic, KapaImageWidget *image, double x, double y, double z, int mode); 212 213 void CreateZoom8 (KapaImageWidget *image, Graphic *graphic, double x, double y); 214 void CreateZoom16 (KapaImageWidget *image, Graphic *graphic, double x, double y); 215 void CreateZoom24 (KapaImageWidget *image, Graphic *graphic, double x, double y); 216 void CreateZoom32 (KapaImageWidget *image, Graphic *graphic, double x, double y); 217 218 int GetActiveSocket (); 219 void InvertButton (Graphic *graphic, Button *button); 220 void bDrawOverlay (KapaImageWidget *image, int N); -
trunk/Ohana/src/kapa2/include/structures.h
r14498 r14590 13 13 Cursor cursor; 14 14 int x, y; 15 intdx, dy;15 unsigned int dx, dy; 16 16 XColor cmap[256]; 17 17 Colormap colormap; -
trunk/Ohana/src/kapa2/src/CheckGeometry.c
r13320 r14590 4 4 void CheckGeometry (Graphic *graphic, int *argc, char **argv) { 5 5 6 int status, x, y, N; 7 unsigned int dx, dy; 8 int X, Y, dX, dY; 6 int status, N; 9 7 char *temp_name; 10 8 -
trunk/Ohana/src/kapa2/src/CheckPipe.c
r14500 r14590 186 186 187 187 if (!strcmp (word, "TOOL")) { 188 status =SetToolbox (sock);188 SetToolbox (sock); 189 189 KiiSendCommand (sock, 4, "DONE"); 190 190 FINISHED (TRUE); -
trunk/Ohana/src/kapa2/src/CreateZoom8.c
r13479 r14590 68 68 if ((i_end - i_start) % expand_out == 0) dropback = 0; 69 69 70 out_pix = ( char *) image[0].zoom.data;70 out_pix = (unsigned char *) image[0].zoom.data; 71 71 imdata = (float *) image[0].matrix.buffer; 72 72 in_pix = &imdata[DX*(int)MAX(Ry,0) + (int)MAX(Rx,0)]; -
trunk/Ohana/src/kapa2/src/DefineSection.c
r13479 r14590 4 4 int DefineSection (int sock) { 5 5 6 int i,N, MoveSection;6 int N, MoveSection; 7 7 char name[128]; 8 8 double x, y, dx, dy; -
trunk/Ohana/src/kapa2/src/DrawButton.c
r13320 r14590 2 2 3 3 void DrawButton (Graphic *graphic, Button *button) { 4 5 int y, dX;6 4 7 5 XSetForeground (graphic[0].display, graphic[0].gc, graphic[0].back); -
trunk/Ohana/src/kapa2/src/EraseImage.c
r13479 r14590 3 3 int EraseImage () { 4 4 5 char buffer[256];6 int i, status, N;7 5 Graphic *graphic; 8 6 Section *section; -
trunk/Ohana/src/kapa2/src/EraseOverlay.c
r13479 r14590 3 3 int EraseOverlay (int sock) { 4 4 5 char buffer[256]; 6 int i, status, N; 5 int i, N; 7 6 Graphic *graphic; 8 7 Section *section; -
trunk/Ohana/src/kapa2/src/EventLoop.c
r13331 r14590 50 50 if (LastEvent (display, MotionNotify, &event)) UpdatePointer (graphic, (XMotionEvent *) &event); 51 51 if (LastEvent (display, ButtonPress, &event)) InterpretPresses (graphic, (XButtonEvent *) &event); 52 if (LastEvent (display, KeyPress, &event)) InterpretKeys (graphic, &event);52 if (LastEvent (display, KeyPress, &event)) InterpretKeys (graphic, (XKeyEvent *) &event); 53 53 54 54 /* drop and ignore the following StructureNotifyMask events */ -
trunk/Ohana/src/kapa2/src/GetPixelCount.c
r13479 r14590 3 3 int GetPixelCount (int sock) { 4 4 5 int i;6 double xmin, xmax, ymin, ymax;7 5 Graphic *graphic; 8 6 -
trunk/Ohana/src/kapa2/src/InterpretKeys.c
r13479 r14590 6 6 double X, Y, Z, R, D, offset; 7 7 int sock, DX, DY, modstate; 8 char *name, string[16] , line[40];8 char *name, string[16]; 9 9 KeySym keysym; 10 10 XComposeStatus composestatus; … … 134 134 case XK_Tab: 135 135 image[0].MovePointer = image[0].MovePointer ^ TRUE; 136 if (image[0].MovePointer) UpdatePointer (graphic, image,(XMotionEvent *)event);136 if (image[0].MovePointer) UpdatePointer (graphic, (XMotionEvent *)event); 137 137 break; 138 138 } -
trunk/Ohana/src/kapa2/src/InterpretPresses.c
r13479 r14590 3 3 int InterpretPresses (Graphic *graphic, XButtonEvent *event) { 4 4 5 int sock, DX, DY, status, done, this_button , old_cursor;6 char name[16] , line[40];5 int sock, DX, DY, status, done, this_button; 6 char name[16]; 7 7 double X, Y, Z, R, D; 8 8 float *imdata; 9 KeySym keysym;10 9 Button *button; 11 10 Section *section; -
trunk/Ohana/src/kapa2/src/JPEGit24.c
r13479 r14590 33 33 int dropback; /* this is a bit of a kludge... */ 34 34 int dx, dy, DX, DY, pixelN; 35 int status, Nbytes,quality;35 int quality; 36 36 int expand_in, expand_out; 37 37 double expand, Rx, Ry, X, Y; -
trunk/Ohana/src/kapa2/src/LoadFrame.c
r13479 r14590 3 3 int LoadFrame (int sock) { 4 4 5 int i , status;5 int i; 6 6 char Axis[16], Labels[16], Ticks[16]; 7 7 Section *section; -
trunk/Ohana/src/kapa2/src/LoadObject.c
r13479 r14590 123 123 } 124 124 if (Nbytes_send != Npts_send*sizeof(float)) { 125 fprintf (stderr, "Kapa Communication error: unexpected data size %d vs % d\n", Nbytes_send, Npts_send*sizeof(float));125 fprintf (stderr, "Kapa Communication error: unexpected data size %d vs %ld\n", Nbytes_send, Npts_send*sizeof(float)); 126 126 } 127 127 -
trunk/Ohana/src/kapa2/src/LoadOverlay.c
r13479 r14590 4 4 5 5 int i, j, Ntotal, Nbytes, Nread, Nfound, Ntext, Nobjects, overnum; 6 int Noverlay, N OVERLAY, Ntextdata;6 int Noverlay, Ntextdata; 7 7 char *textdata, *buffer, *p, *q; 8 8 Section *section; -
trunk/Ohana/src/kapa2/src/SetImageData.c
r14500 r14590 3 3 int SetImageData (int sock) { 4 4 5 int i;6 double xmin, xmax, ymin, ymax;7 5 Graphic *graphic; 8 6 Section *section; … … 55 53 int SetImageCoords (int sock) { 56 54 57 int i;58 double xmin, xmax, ymin, ymax;59 55 Graphic *graphic; 60 56 Section *section; -
trunk/Ohana/src/kapa2/src/SetImageSize.c
r14500 r14590 7 7 void SetImageSize (Section *section) { 8 8 9 int Xs, Ys, Xe, Ye,dX, dY;9 int Xs, Ys, dX, dY; 10 10 int textpad, textdY, WdY; 11 11 KapaImageWidget *image;
Note:
See TracChangeset
for help on using the changeset viewer.
