Rev 1764 | Rev 2871 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1764 | Rev 2870 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | #include "func.h" |
- | |
2 | #include "parser.h" |
1 | #include "func.h" |
3 | #include "kolibri.h" |
2 | #include "parser.h" |
4 | #include "use_library.h" |
3 | #include "kolibri.h" |
5 | 4 | #include "use_library.h" |
|
Line 43... | Line 42... | ||
43 | Dword point_count = 0; |
42 | double *points; |
44 | double x1,y1,x2,y2; |
43 | Dword point_count = 0; |
45 | char *funct = NULL; |
44 | double x1,y1,x2,y2; |
46 | 45 | char *funct = NULL; |
|
Line 47... | Line 46... | ||
47 | char edit_path[256]; |
46 | |
48 | //Dword editbox_y = WND_H - 16, editbox_w = WND_W - 70; |
47 | char edit_path[1024]; |
49 | edit_box mybox = {0,9*8-5,WND_H - 16-32,0xffffff,0x6a9480,0,0x808080,0,99,(dword)&edit_path,0}; |
48 | //Dword editbox_y = WND_H - 16, editbox_w = WND_W - 70; |
Line 50... | Line 49... | ||
50 | 49 | edit_box mybox = {0,9*8-5,WND_H - 16-32,0xffffff,0x6a9480,0,0x808080,0,99,(dword)&edit_path,0}; |
|
Line 375... | Line 374... | ||
375 | kosFileInfo fileInfo; |
374 | { |
376 | kosBDVK bdvk; |
375 | kosFileInfo fileInfo; |
377 | int filePointer = 0; |
376 | kosBDVK bdvk; |
378 | 377 | int filePointer = 0; |
|
Line 379... | Line -... | ||
379 | Dword count; |
- | |
380 | int i,j,k; |
378 | |
381 | double d; |
379 | int i,j,k; |
382 | Dword filesize, num_number; |
380 | double d; |
Line 383... | Line 381... | ||
383 | 381 | Dword filesize, num_number; |
|
Line 551... | Line 549... | ||
551 | } |
549 | |
Line 552... | Line 550... | ||
552 | 550 | } |
|
553 | void draw_window(void) |
551 | |
554 | { |
- | |
555 | char str[80]; |
- | |
556 | int i; |
552 | void draw_window(void) |
557 | double xx0=0.0, yy0=0.0, xx,yy; |
553 | { |
558 | sProcessInfo info; |
554 | double xx0=0.0, yy0=0.0; |
559 | Dword wi, he; |
555 | sProcessInfo info; |
Line 560... | Line 556... | ||
560 | void *p; |
556 | Dword wi, he; |
561 | 557 | void *p; |
|
562 | for (i = 0; i < 1024; i++) |
558 | |
Line 563... | Line 559... | ||
563 | info.rawData[i] = 0; |
559 | for (int i = 0; i < 1024; i++) |
564 | kos_ProcessInfo(&info, 0xFFFFFFFF); |
560 | info.rawData[i] = 0; |
Line 574... | Line 570... | ||
574 | 570 | he = WND_H; |
|
Line 575... | Line 571... | ||
575 | mybox.top = he - 45; |
571 | |
576 | mybox.width = wi - mybox.left - 80; |
572 | mybox.top = he - 45; |
Line 577... | Line -... | ||
577 | - | ||
578 | // start redraw |
573 | mybox.width = wi - mybox.left - 80; |
579 | kos_WindowRedrawStatus(1); |
574 | |
580 | kos_DefineAndDrawWindow(10,40,WND_W,WND_H, |
575 | kos_WindowRedrawStatus(1); |
Line 581... | Line 576... | ||
581 | 0x33,0xFFFFFF,0,0,(Dword)full_head); |
576 | kos_DefineAndDrawWindow(10,40,WND_W,WND_H, 0x33,0xFFFFFF,0,0,(Dword)full_head); |
Line 582... | Line 577... | ||
582 | 577 | kos_WindowRedrawStatus(2); |
|
583 | rtlDebugOutString("entering draw_window\n"); |
578 | |
584 | 579 | if (info.rawData[70]&0x04) return; //íè÷åãî íå äåëàòü åñëè îêíî ñõëîïíóòî â çàãîëîâîê |
|
585 | if (point_count == 0 && funct == NULL) |
580 | |
Line 600... | Line 595... | ||
600 | 595 | edit_box_draw((DWORD)&mybox); |
|
Line 601... | Line 596... | ||
601 | kos_DefineButton(wi - 70, mybox.top, 50, 12, 5, 0xc0c0c0); |
596 | |
602 | kos_WriteTextToWindow(wi - 58, mybox.top + 4, 0, 0, (char*)str_editfile, strlen(str_editfile)); |
597 | kos_DefineButton(wi - 70, mybox.top, 50, 12, 5, 0xc0c0c0); |
Line 603... | Line -... | ||
603 | - | ||
604 | // end redraw |
- | |
605 | kos_WindowRedrawStatus(2); |
598 | kos_WriteTextToWindow(wi - 58, mybox.top + 4, 0, 0, (char*)str_editfile, strlen(str_editfile)); |
Line 606... | Line 599... | ||
606 | } |
599 | |
607 | 600 | } |
|
608 | void kos_Main() |
601 | |
Line 675... | Line 668... | ||
675 | Dword button; |
668 | // button pressed; we have only one button, close |
676 | kos_GetButtonID(button); |
669 | Dword button; |
677 | if (button == 1) |
670 | kos_GetButtonID(button); |
678 | kos_ExitApp(); |
671 | if (button == 1) |
679 | else if (button == 5) |
672 | kos_ExitApp(); |
680 | { |
673 | if (button == 5) |
681 | LaunchTinypad(); |
- | |
682 | } |
674 | LaunchTinypad(); |
683 | } |
675 | } |
684 | } |
676 | } |
685 | }>>>=>>> |
677 | }>>>=>>> |
686 | >>>=>=>=>=>=>=>>> |
- |