Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /*
  2.         libGUI dinamic library
  3.         (c) andrew_programmer 2009
  4.  */
  5.  
  6. //service libGUI types of data,functions and constants
  7. #include "types.h"
  8. #include "libGUI.h"
  9. #include "kolibri_system.h"
  10. #include "draw_controls.h"
  11. #include "fonts_meneger.h"
  12. #include "keys.h"
  13.  
  14. //controls
  15. #include "control_button.h"
  16. #include "control_image.h"
  17. #include "control_progress_bar.h"
  18. #include "control_scroll_bar.h"
  19. #include "control_scrolled_window.h"
  20. #include "control_text.h"
  21.  
  22. //some libC functions
  23. #include "stdarg.h"
  24. #include "stdio.h"
  25. #include "string.h"
  26. #include "stdlib.h"
  27.  
  28. #include "stdio.inc"
  29. #include "string.inc"
  30. #include "malloc.inc"
  31. #include "stdlib.inc"
  32. #include "kolibri_system.inc"
  33. #include "draw_controls.inc"
  34. #include "fonts_meneger.inc"
  35. #include "libGUI_menegement.inc"
  36. #include "parent_window.inc"
  37. #include "main_libGUI.inc"
  38. #include "control_text.inc"
  39. #include "control_image.inc"
  40. #include "control_button.inc"
  41. #include "control_progress_bar.inc"
  42. #include "control_scroll_bar.inc"
  43. #include "control_scrolled_window.inc"
  44.  
  45.  
  46. typedef struct
  47. {
  48.         char *name;
  49.         void *function;
  50. }export_t;
  51.  
  52. //char szSTART[]                                           = "START";
  53. char szLibGUIversion[]                                   = "LibGUIversion";
  54. char szInitLibGUI[]                                      = "InitLibGUI";
  55. char szLibGUImain[]                                      = "LibGUImain";
  56. char szQuitLibGUI[]                                      = "QuitLibGUI";
  57.  
  58. char szCreateWindow[]                                    = "CreateWindow";
  59. char szSetWindowSizeRequest[]                            = "SetWindowSizeRequest";
  60.  
  61. char szPackControls[]                                    = "PackControls";
  62. char szDestroyControl[]                                  = "DestroyControl";
  63. char szSetControlSizeRequest[]                           = "SetControlSizeRequest";
  64. char szGetControlSizeX[]                                 = "GetControlSizeX";
  65. char szGetControlSizeY[]                                 = "GetControlSizeY";
  66. char szSetControlNewPosition[]                           = "SetControlNewPosition";
  67. char szGetControlPositionX[]                             = "GetControlPositionX";
  68. char szGetControlPositionY[]                             = "GetControlPositionY";
  69. char szSetFocuse[]                                       = "SetFocuse";
  70. char szRedrawControl[]                                   = "RedrawControl";
  71. char szSpecialRedrawControl[]                            = "SpecialRedrawControl";
  72.  
  73. char szSetCallbackFunction[]                             = "SetCallbackFunction";
  74. char szBlockCallbackFunction[]                           = "BlockCallbackFunction";
  75. char szUnblockCallbackFunction[]                         = "UnblockCallbackFunction";
  76.  
  77. char szSetIDL_Function[]                                 = "SetIDL_Function";
  78. char szDestroyIDL_Function[]                             = "DestroyIDL_Function";
  79.  
  80. char szSetTimerCallbackForFunction[]                     = "SetTimerCallbackForFunction";
  81. char szDestroyTimerCallbackForFunction[]                 = "DestroyTimerCallbackForFunction";
  82.  
  83. char szSetCallbackFunctionForEvent[]                     = "SetCallbackFunctionForEvent";
  84. char szDestroyCallbackFunctionForEvent[]                 = "DestroyCallbackFunctionForEvent";
  85.  
  86. char szCreateButton[]                                    = "CreateButton";
  87. char szCreateButtonWithText[]                            = "CreateButtonWithText";
  88.  
  89. char szCreateProgressBar[]                               = "CreateProgressBar";
  90. char szSetProgressBarPulse[]                             = "SetProgressBarPulse";
  91. char szProgressBarSetText[]                              = "ProgressBarSetText";
  92. char szProgressBarGetText[]                              = "ProgressBarGetText";
  93.  
  94. char szCreateHorizontalScrollBar[]                       = "CreateHorizontalScrollBar";
  95. char szCreateVerticalScrollBar[]                         = "CreateVerticalScrollBar";
  96.  
  97. char szCreateScrolledWindow[]                            = "CreateScrolledWindow";
  98. char szScrolledWindowPackControls[]                      = "ScrolledWindowPackControls";
  99.  
  100. char szCreateImage[]                                     = "CreateImage";
  101.  
  102. char szCreateText[]                                      = "CreateText";
  103. char szTextBackgroundOn[]                                = "TextBackgroundOn";
  104. char szTextBackgroundOff[]                               = "TextBackgroundOff";
  105.  
  106. char szLoadFont[]                                        = "LoadFont";
  107. char szFreeFont[]                                        = "FreeFont";
  108.  
  109. export_t        EXPORTS[]__asm__("EXPORTS") =
  110.         {
  111.                 {szLibGUIversion,                         LibGUIversion                        },
  112.                 {szInitLibGUI,                            InitLibGUI                           },
  113.                 {szLibGUImain,                            LibGUImain                           },
  114.                 {szQuitLibGUI,                            QuitLibGUI                           },
  115.                
  116.                 {szCreateWindow,                          CreateWindow                         },
  117.                 {szSetWindowSizeRequest,                  SetWindowSizeRequest                 },
  118.                
  119.                 {szPackControls,                          PackControls                         },
  120.                 {szDestroyControl,                        DestroyControl                       },
  121.                 {szSetControlSizeRequest,                 SetControlSizeRequest                },
  122.                 {szGetControlSizeX,                       GetControlSizeX                      },
  123.                 {szGetControlSizeY,                       GetControlSizeY                      },
  124.                 {szSetControlNewPosition,                 SetControlNewPosition                },
  125.                 {szGetControlPositionX,                   GetControlPositionX                  },
  126.                 {szGetControlPositionY,                   GetControlPositionY                  },
  127.                 {szSetFocuse,                             SetFocuse                            },      
  128.                 {szRedrawControl,                         RedrawControl                        },
  129.                 {szSpecialRedrawControl,                  SpecialRedrawControl                 },
  130.                
  131.                 {szSetCallbackFunction,                   SetCallbackFunction                  },
  132.                 {szBlockCallbackFunction,                 BlockCallbackFunction                },
  133.                 {szUnblockCallbackFunction,               UnblockCallbackFunction              },
  134.                
  135.                 {szSetIDL_Function,                       SetIDL_Function                      },
  136.                 {szDestroyIDL_Function,                   DestroyIDL_Function                  },
  137.                
  138.                 {szSetTimerCallbackForFunction,           SetTimerCallbackForFunction          },
  139.                 {szDestroyTimerCallbackForFunction,       DestroyTimerCallbackForFunction      },
  140.                
  141.                 {szSetCallbackFunctionForEvent,           SetCallbackFunctionForEvent          },
  142.                 {szDestroyCallbackFunctionForEvent,       DestroyCallbackFunctionForEvent      },
  143.                
  144.                 {szCreateButton,                          CreateButton                         },
  145.                 {szCreateButtonWithText,                  CreateButtonWithText                 },
  146.                
  147.                 {szCreateProgressBar,                     CreateProgressBar                    },
  148.                 {szSetProgressBarPulse,                   SetProgressBarPulse                  },
  149.                 {szProgressBarSetText,                    ProgressBarSetText                   },
  150.                 {szProgressBarGetText,                    ProgressBarGetText                   },
  151.                
  152.                 {szCreateHorizontalScrollBar,             CreateHorizontalScrollBar            },
  153.                 {szCreateVerticalScrollBar,               CreateVerticalScrollBar              },
  154.                
  155.                 {szCreateScrolledWindow,                  CreateScrolledWindow                 },
  156.                 {szScrolledWindowPackControls,            ScrolledWindowPackControls           },
  157.                
  158.                 {szCreateImage,                           CreateImage                          },
  159.                
  160.                 {szCreateText,                            CreateText                           },
  161.                 {szTextBackgroundOn,                      TextBackgroundOn                     },
  162.                 {szTextBackgroundOff,                     TextBackgroundOff                    },
  163.                
  164.                 {szLoadFont,                              LoadFont                             },
  165.                 {szFreeFont,                              FreeFont                             },
  166.                
  167.                 {NULL,NULL},
  168.         };
  169.