Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. #include <kolibri.h>
  2. #include <kos_heap.h>
  3. #include <kos_file.h>
  4.  
  5. using namespace Kolibri;
  6.  
  7. const char header[] = "bcc32 program template";
  8.  
  9. bool KolibriOnStart(TStartData &kos_start, TThreadData th)
  10. {
  11.         kos_start.Left = 10;
  12.         kos_start.Top = 40;
  13.         kos_start.Width = 500;
  14.         kos_start.Height = 500;
  15.         kos_start.WinData.WindowColor = 0xFFFFFF;
  16.         kos_start.WinData.WindowType = 0x34; // 0x34 - fixed, 0x33 - not fixed
  17.         kos_start.WinData.Title = header;
  18.         return true;
  19. }
  20.  
  21. void KolibriOnPaint(void)
  22. {
  23.         // SOME DRAWING CODE
  24. }
  25.  
  26. void KolibriOnButton(long id, TThreadData th)
  27. {
  28.         // button event (BUTTON ID)
  29.         /*
  30.         switch(id){
  31.         case 2:
  32.                 SetWindowCaption("Red");
  33.                 break;
  34.         ...
  35.         case N:
  36.                 SetWindowCaption("Yellow");
  37.                 //break;
  38.         };
  39.         */
  40. }
  41. /*
  42. int KolibriOnIdle(TThreadData th)
  43. {
  44.         return -1;
  45. }
  46. void KolibriOnSize(int window_rect[], TThreadData th) {}
  47. void KolibriOnKeyPress(TThreadData th)
  48. {
  49.         GetKey();
  50. }
  51. void KolibriOnMouse(TThreadData th) {}
  52. */
  53.