Changeset 21153 for trunk/Ohana/src/kapa2
- Timestamp:
- Jan 22, 2009, 10:43:26 AM (18 years ago)
- Location:
- trunk/Ohana/src/kapa2
- Files:
-
- 24 edited
-
include/kii.struct.h (modified) (3 diffs)
-
include/prototypes.h (modified) (9 diffs)
-
include/structures.h (modified) (1 diff)
-
src/ButtonFunctions.c (modified) (1 diff)
-
src/CheckVisual.c (modified) (4 diffs)
-
src/DefineSection.c (modified) (1 diff)
-
src/EraseCurrentPlot.c (modified) (1 diff)
-
src/ErasePlots.c (modified) (1 diff)
-
src/EraseSections.c (modified) (1 diff)
-
src/EventLoop.c (modified) (2 diffs)
-
src/FlushDisplay.c (modified) (1 diff)
-
src/Image.c (modified) (1 diff)
-
src/InvertButton.c (modified) (1 diff)
-
src/LoadFrame.c (modified) (1 diff)
-
src/MapWindow.c (modified) (1 diff)
-
src/Reconfig.c (modified) (1 diff)
-
src/Refresh.c (modified) (1 diff)
-
src/Resize.c (modified) (1 diff)
-
src/Sections.c (modified) (4 diffs)
-
src/SetGraphData.c (modified) (1 diff)
-
src/SetGraphStyle.c (modified) (1 diff)
-
src/SetLimits.c (modified) (1 diff)
-
src/SetUpGraphic.c (modified) (1 diff)
-
src/TopWindow.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/kapa2/include/kii.struct.h
r13320 r21153 29 29 int width, height; 30 30 char *bitmap; /* picture on button */ 31 int (*function_1) ( ); /* mouse_button 1 function */32 int (*function_2) ( ); /* mouse_button 2 function */33 int (*function_3) ( ); /* mouse_button 3 function */31 int (*function_1) (void); /* mouse_button 1 function */ 32 int (*function_2) (void); /* mouse_button 2 function */ 33 int (*function_3) (void); /* mouse_button 3 function */ 34 34 } Button; 35 35 … … 41 41 int outline; /* draw an outline? */ 42 42 int cursor; /* location of cursor (if selected) */ 43 int (*function) ( ); /* textline function */43 int (*function) (void); /* textline function */ 44 44 } TextLine; 45 45 … … 54 54 int cursor_x; /* location of cursor (if selected) */ 55 55 int cursor_y; /* location of cursor (if selected) */ 56 int (*function) ( ); /* textline function */56 int (*function) (void); /* textline function */ 57 57 } TextBox; 58 58 -
trunk/Ohana/src/kapa2/include/prototypes.h
r21060 r21153 4 4 void SetUpGraphic PROTO((int *argc, char **argv)); 5 5 void DefineLayout PROTO((int, char **)); 6 int EventLoop PROTO(( ));7 void CloseDisplay PROTO(( ));6 int EventLoop PROTO((void)); 7 void CloseDisplay PROTO((void)); 8 8 9 9 /* SetUpGraphic */ … … 43 43 /* EventLoop */ 44 44 int PScommand PROTO((int sock)); 45 int CheckPipe PROTO(( ));45 int CheckPipe PROTO((void)); 46 46 int Reconfig PROTO((XEvent *event)); 47 void Refresh PROTO(( ));47 void Refresh PROTO((void)); 48 48 49 49 /* CheckPipe */ … … 79 79 80 80 /* Section Utilities */ 81 Section *InitSection PROTO(( ));81 Section *InitSection PROTO((void)); 82 82 void FreeSection PROTO((Section *section)); 83 void FreeSections PROTO(( ));83 void FreeSections PROTO((void)); 84 84 Section *AddSection PROTO((char *name, float x, float y, float dx, float dy)); 85 85 int DelSection PROTO((char *name)); 86 86 int GetSectionByName PROTO((char *name)); 87 int GetNumberOfSections PROTO(( ));87 int GetNumberOfSections PROTO((void)); 88 88 Section *GetSectionByNumber PROTO((int N)); 89 Section *GetActiveSection PROTO(( ));89 Section *GetActiveSection PROTO((void)); 90 90 int SetActiveSectionByNumber PROTO((int N)); 91 91 int ListSection PROTO((int sock)); 92 92 void SetSectionSizes PROTO((Section *section)); 93 93 94 KapaGraphWidget *InitGraph PROTO(( ));94 KapaGraphWidget *InitGraph PROTO((void)); 95 95 void DrawGraph PROTO((KapaGraphWidget *graph)); 96 96 void SetGraphSize PROTO((Section *section)); … … 131 131 void bDrawTick PROTO((double fx, double fy, double dfx, double dfy, int P, double min, double max, double value, int IsLabel, int IsMajor, int naxis)); 132 132 void bDrawClipLine PROTO((double x0, double y0, double x1, double y1, double X0, double Y1, double X1, double Y0)); 133 bDrawBuffer *bDrawIt PROTO(( ));133 bDrawBuffer *bDrawIt PROTO((void)); 134 134 void bDrawGraph PROTO((KapaGraphWidget *graph)); 135 135 … … 137 137 int LastEvent PROTO((Display *display, int type, XEvent *event)); 138 138 void FreeObjectData PROTO((Gobjects *object)); 139 void FlushDisplay PROTO(( ));139 void FlushDisplay PROTO((void)); 140 140 unsigned long GetColor PROTO((Display *display, char *name, Colormap colormap, unsigned long default_color)); 141 141 void QuitX PROTO((Display *display, char *message)); 142 Graphic *GetGraphic PROTO(( ));142 Graphic *GetGraphic PROTO((void)); 143 143 int GetPixelCount PROTO((int sock)); 144 144 145 int Center PROTO(( ));146 int Parity PROTO(( ));145 int Center PROTO((int sock)); 146 int Parity PROTO((int sock)); 147 147 void SetColorScale PROTO((Graphic *graphic, KapaImageWidget *image)); 148 148 void SetColorScale1D PROTO((Graphic *graphic, KapaImageWidget *image)); … … 155 155 int LoadPicture PROTO((int sock)); 156 156 157 KapaImageWidget *InitImageWidget PROTO(( ));157 KapaImageWidget *InitImageWidget PROTO((void)); 158 158 int InitImageChannel PROTO((KapaImageChannel *channel)); 159 159 void FreeImage PROTO((KapaImageWidget *image)); … … 161 161 162 162 void InitButtonSize PROTO((Button *button, int width, int height, char *bitmap)); 163 void InitButtonFunc PROTO((Button *button, int (*function)( )));163 void InitButtonFunc PROTO((Button *button, int (*function)(Graphic *graphic, KapaImageWidget *image))); 164 164 void DrawImage PROTO((KapaImageWidget *image)); 165 165 void DrawButton PROTO((Graphic *graphic, Button *button)); … … 232 232 // void CreateZoom32 (KapaImageWidget *image, Graphic *graphic, double x, double y); 233 233 234 int GetActiveSocket ( );234 int GetActiveSocket (void); 235 235 void InvertButton (Graphic *graphic, Button *button); 236 236 void bDrawOverlay (KapaImageWidget *image, int N); 237 237 238 238 /* color cube tools */ 239 CCNode *CCNodeAlloc ( );239 CCNode *CCNodeAlloc (void); 240 240 CCNode *CCFindChild (CCNode *node, float x, float y, float z); 241 241 int CCSplitNode (CCNode *node); … … 253 253 254 254 int SetColorScale3D_CC (Graphic *graphic, KapaImageWidget *image); 255 int SetColorCubeHistogram ( );255 int SetColorCubeHistogram (void); -
trunk/Ohana/src/kapa2/include/structures.h
r17530 r21153 78 78 int cursor_x; /* location of cursor (if selected) */ 79 79 int cursor_y; /* location of cursor (if selected) */ 80 int (*function) ( ); /* textline function */80 int (*function) (void); /* textline function */ 81 81 } TextBox; 82 82 -
trunk/Ohana/src/kapa2/src/ButtonFunctions.c
r16810 r21153 102 102 image[0].DecimalDegrees = image[0].DecimalDegrees ^ TRUE; 103 103 StatusBox (graphic, image); 104 FlushDisplay ( graphic[0].display);104 FlushDisplay (); 105 105 return (TRUE); 106 106 -
trunk/Ohana/src/kapa2/src/CheckVisual.c
r16810 r21153 34 34 } 35 35 36 // skip the default and the PseudoColor visuals, go for TrueColor first 37 # if (0) 36 38 /* check default visual first */ 37 39 for (i = 0; (i < Nfound) && (graphic[0].visual != visual_list[i].visual); i++); … … 40 42 exit (0); 41 43 } 44 # endif 42 45 43 46 // set these based on selected visual 44 47 isColor = isDefault = isDynamic = FALSE; 45 48 49 # if (0) 46 50 // attempt to select the most desirable type of visual: Default as PseudoColor (XXX is it still true?) 47 51 if (DEBUG) fprintf (stderr, "default visual class is %d\n", visual_list[i].class); … … 52 56 goto test_pixels; 53 57 } 58 # endif 59 60 // attempt to select the most desirable type of visual: TrueColor (XXX is it still true?) 61 for (i = 0; (i < Nfound) && (visual_list[i].class != TrueColor); i++); 62 if (i != Nfound) { 63 isColor = TRUE; 64 if (DEBUG) fprintf (stderr, "visual class is %d\n", visual_list[i].class); 65 isDefault = (graphic[0].visual == visual_list[i].visual); 66 graphic[0].visual = visual_list[i].visual; 67 graphic[0].visualclass = FALSE; 68 goto test_pixels; 69 } 54 70 55 71 // attempt to select the most desirable type of visual: PseudoColor (XXX is it still true?) … … 72 88 graphic[0].visual = visual_list[i].visual; 73 89 graphic[0].visualclass = TRUE; 74 goto test_pixels;75 }76 77 // attempt to select the most desirable type of visual: TrueColor (XXX is it still true?)78 for (i = 0; (i < Nfound) && (visual_list[i].class != TrueColor); i++);79 if (i != Nfound) {80 isColor = TRUE;81 if (DEBUG) fprintf (stderr, "visual class is %d\n", visual_list[i].class);82 isDefault = (graphic[0].visual == visual_list[i].visual);83 graphic[0].visual = visual_list[i].visual;84 graphic[0].visualclass = FALSE;85 90 goto test_pixels; 86 91 } -
trunk/Ohana/src/kapa2/src/DefineSection.c
r14590 r21153 34 34 if (MoveSection) { 35 35 SetSectionSizes (section); 36 Refresh ( 1);36 Refresh (); 37 37 } 38 38 -
trunk/Ohana/src/kapa2/src/EraseCurrentPlot.c
r13479 r21153 15 15 16 16 if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window); 17 Refresh ( 1);17 Refresh (); 18 18 19 19 return (TRUE); -
trunk/Ohana/src/kapa2/src/ErasePlots.c
r13320 r21153 18 18 19 19 if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window); 20 Refresh ( 1);20 Refresh (); 21 21 22 22 return (TRUE); -
trunk/Ohana/src/kapa2/src/EraseSections.c
r13320 r21153 11 11 12 12 if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window); 13 Refresh ( 1);13 Refresh (); 14 14 15 15 return (TRUE); -
trunk/Ohana/src/kapa2/src/EventLoop.c
r14590 r21153 25 25 display = graphic->display; 26 26 27 if (USE_XWINDOW) Refresh ( 1);27 if (USE_XWINDOW) Refresh (); 28 28 29 29 status = TRUE; … … 46 46 if (LastEvent (display, ConfigureNotify, &event)) Reconfig (&event); 47 47 if (LastEvent (display, CirculateNotify, &event)) Reconfig (&event); 48 if (LastEvent (display, Expose, &event)) Refresh ( 1);48 if (LastEvent (display, Expose, &event)) Refresh (); 49 49 if (LastEvent (display, MappingNotify, &event)) XRefreshKeyboardMapping ((XMappingEvent *) &event); 50 50 if (LastEvent (display, MotionNotify, &event)) UpdatePointer (graphic, (XMotionEvent *) &event); -
trunk/Ohana/src/kapa2/src/FlushDisplay.c
r13320 r21153 5 5 # define DTIME(A,B) ((A.tv_sec - B.tv_sec) + 1e-6*(A.tv_usec - B.tv_usec)) 6 6 7 void FlushDisplay ( ) {7 void FlushDisplay (void) { 8 8 9 9 struct timeval now; -
trunk/Ohana/src/kapa2/src/Image.c
r16810 r21153 190 190 } 191 191 192 FlushDisplay ( graphic[0].display);192 FlushDisplay (); 193 193 } 194 194 -
trunk/Ohana/src/kapa2/src/InvertButton.c
r13320 r21153 12 12 13 13 DrawButton (graphic, button); 14 FlushDisplay ( graphic[0].display);14 FlushDisplay (); 15 15 16 16 graphic[0].fore = fore; -
trunk/Ohana/src/kapa2/src/LoadFrame.c
r18426 r21153 81 81 } 82 82 if (USE_XWINDOW) XClearWindow (graphic.display, graphic.window); 83 Refresh ( 1);83 Refresh (); 84 84 } else { 85 85 FlushDisplay (); -
trunk/Ohana/src/kapa2/src/MapWindow.c
r13320 r21153 6 6 XMapRaised (graphic->display, graphic->window); 7 7 XMapSubwindows (graphic->display, graphic->window); 8 FlushDisplay ( graphic);8 FlushDisplay (); 9 9 } -
trunk/Ohana/src/kapa2/src/Reconfig.c
r13479 r21153 29 29 30 30 if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window); 31 Refresh ( 1);31 Refresh (); 32 32 33 33 return (TRUE); -
trunk/Ohana/src/kapa2/src/Refresh.c
r16388 r21153 1 1 # include "Ximage.h" 2 2 3 void Refresh ( ) {3 void Refresh (void) { 4 4 5 5 int i, Nsection; -
trunk/Ohana/src/kapa2/src/Resize.c
r13479 r21153 34 34 35 35 if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window); 36 Refresh ( 1);36 Refresh (); 37 37 38 38 return (TRUE); -
trunk/Ohana/src/kapa2/src/Sections.c
r13479 r21153 177 177 sections[N] = sections[N+1]; 178 178 sections[N+1] = tmpSection; 179 Refresh ( 1);179 Refresh (); 180 180 return (TRUE); 181 181 } … … 187 187 sections[N] = sections[N-1]; 188 188 sections[N-1] = tmpSection; 189 Refresh ( 1);189 Refresh (); 190 190 return (TRUE); 191 191 } … … 199 199 } 200 200 sections[i] = tmpSection; 201 Refresh ( 1);201 Refresh (); 202 202 return (TRUE); 203 203 } … … 211 211 } 212 212 sections[i] = tmpSection; 213 Refresh ( 1);213 Refresh (); 214 214 return (TRUE); 215 215 } -
trunk/Ohana/src/kapa2/src/SetGraphData.c
r13479 r21153 73 73 74 74 if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window); 75 Refresh ( 1);75 Refresh (); 76 76 77 77 return (TRUE); -
trunk/Ohana/src/kapa2/src/SetGraphStyle.c
r13479 r21153 55 55 56 56 if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window); 57 Refresh ( 1);57 Refresh (); 58 58 59 59 return (TRUE); -
trunk/Ohana/src/kapa2/src/SetLimits.c
r13479 r21153 33 33 34 34 if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window); 35 Refresh ( 1);35 Refresh (); 36 36 37 37 return (TRUE); -
trunk/Ohana/src/kapa2/src/SetUpGraphic.c
r16039 r21153 44 44 LoadFont (graphic, argc, argv, "fixed"); 45 45 46 // FlushDisplay (graphic);47 46 XSetWindowBackground (graphic->display, graphic->window, graphic->back); 48 47 -
trunk/Ohana/src/kapa2/src/TopWindow.c
r13320 r21153 15 15 MakeCursor (graphic, DEFAULT_CURSOR); 16 16 XFreeCursor (graphic->display, graphic->cursor); 17 // FlushDisplay (graphic);18 17 }
Note:
See TracChangeset
for help on using the changeset viewer.
