Changeset 27636
- Timestamp:
- Apr 7, 2010, 5:00:10 PM (16 years ago)
- Location:
- branches/eam_branches/Ohana.20100407/src
- Files:
-
- 6 edited
-
kapa2/src/CheckPipe.c (modified) (1 diff)
-
kapa2/src/DefineSection.c (modified) (3 diffs)
-
kapa2/src/Sections.c (modified) (4 diffs)
-
libkapa/include/kapa.h (modified) (1 diff)
-
libkapa/src/KapaWindow.c (modified) (1 diff)
-
opihi/cmd.data/section.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/Ohana.20100407/src/kapa2/src/CheckPipe.c
r25757 r27636 221 221 } 222 222 223 if (!strcmp (word, "BSEC")) { 224 status = SetSectionBG (sock); 225 KiiSendCommand (sock, 4, "DONE"); 226 FINISHED (TRUE); 227 } 228 223 229 if (!strcmp (word, "FONT")) { 224 230 status = SetFont (sock); -
branches/eam_branches/Ohana.20100407/src/kapa2/src/DefineSection.c
r21153 r27636 9 9 Section *section; 10 10 11 KiiScanMessage (sock, "%s %lf %lf %lf %lf ", name, &x, &y, &dx, &dy);11 KiiScanMessage (sock, "%s %lf %lf %lf %lf %d", name, &x, &y, &dx, &dy, &bg); 12 12 13 13 MoveSection = FALSE; … … 15 15 N = GetSectionByName (name); 16 16 if (N < 0) { 17 section = AddSection (name, x, y, dx, dy );17 section = AddSection (name, x, y, dx, dy, bg); 18 18 MoveSection = TRUE; 19 19 } else { … … 30 30 section[0].dx = dx; 31 31 section[0].dy = dy; 32 section[0].bg = bg; 32 33 } 33 34 -
branches/eam_branches/Ohana.20100407/src/kapa2/src/Sections.c
r21153 r27636 16 16 section[0].dx = 0; 17 17 section[0].dy = 0; 18 section[0].bg = -1; 18 19 19 20 section[0].name = NULL; … … 42 43 } 43 44 44 Section *AddSection (char *name, float x, float y, float dx, float dy ) {45 Section *AddSection (char *name, float x, float y, float dx, float dy, int bg) { 45 46 46 47 int N; … … 61 62 sections[N][0].dx = dx; 62 63 sections[N][0].dy = dy; 64 sections[N][0].bg = bg; 63 65 ActiveSection = N; 64 66 return (sections[N]); … … 91 93 } 92 94 95 int SetSectionBG (char *name) { 96 97 int i; 98 99 for (i = 0; i < Nsections; i++) { 100 if (strcmp (name, sections[i][0].name)) continue; 101 sections[i][0].bg = 102 } 103 return (-1); 104 } 105 93 106 int GetNumberOfSections () { 94 107 return (Nsections); -
branches/eam_branches/Ohana.20100407/src/libkapa/include/kapa.h
r27435 r27636 72 72 float dx; 73 73 float dy; 74 int bg; 74 75 } KapaSection; 75 76 -
branches/eam_branches/Ohana.20100407/src/libkapa/src/KapaWindow.c
r27588 r27636 312 312 313 313 KiiSendCommand (fd, 4, "DSEC"); 314 KiiSendMessage (fd, "%s %6.3f %6.3f %6.3f %6.3f ",314 KiiSendMessage (fd, "%s %6.3f %6.3f %6.3f %6.3f %3d", 315 315 section[0].name, 316 316 section[0].x, 317 317 section[0].y, 318 318 section[0].dx, 319 section[0].dy); 319 section[0].dy, 320 section[0].bg); 321 KiiWaitAnswer (fd, "DONE"); 322 return (TRUE); 323 } 324 325 int KapaSectionBG (int fd, char *name, int bg) { 326 327 KiiSendCommand (fd, 4, "BSEC"); 328 KiiSendMessage (fd, "%s %3d", name, bg); 320 329 KiiWaitAnswer (fd, "DONE"); 321 330 return (TRUE); -
branches/eam_branches/Ohana.20100407/src/opihi/cmd.data/section.c
r27491 r27636 1 1 # include "data.h" 2 2 3 enum {NONE, LIST, UP, DOWN, TOP, BOTTOM, TOOL };3 enum {NONE, LIST, UP, DOWN, TOP, BOTTOM, TOOL, BG}; 4 4 5 5 int section (int argc, char **argv) { … … 37 37 location = argv[N]; 38 38 remove_argument (N, &argc, argv); 39 } 40 41 background = -1; // invisible 42 if ((N = get_argument (argc, argv, "-bg"))) { 43 remove_argument (N, &argc, argv); 44 background = KapaColorByName(argv[N]); 45 remove_argument (N, &argc, argv); 46 action = BG; 39 47 } 40 48 … … 82 90 break; 83 91 92 case BG: 93 KapaSectionBG (kapa, argv[1], bg); 94 break; 95 84 96 case TOOL: 85 97 if (!strcmp(location, "-x")) { … … 121 133 section.dx = atof (argv[4]); 122 134 section.dy = atof (argv[5]); 135 section.bg = background; 123 136 KapaSetSection (kapa, §ion); 124 137 return (TRUE);
Note:
See TracChangeset
for help on using the changeset viewer.
