- Main Page
- Files
- Related Pages

- File List
- Globals

# simplewidget.h

Go to the documentation of this file.

    00001
    00018 #ifndef _SIMPLEWIDGET_H
    00019 #define _SIMPLEWIDGET_H
    00020
    00021 #define BYTES_PER_PIXEL 2
    00022
    00023 #define SIMPLEWIDGET_SUCCESS 0
    00024 #define SIMPLEWIDGET_FAILURE -1
    00025
    00026 typedef void * simplewidget_button;
    00027 typedef void * simplewidget_screen;
    00028 typedef void * simplewidget_text;
    00029 typedef void * simplewidget_jpeg;
    00030 typedef void * simplewidget_png;
    00031
    00032 #if defined (__cplusplus)
    00033 extern "C" {
    00034 #endif
    00035
    00045 extern int simplewidget_screen_init(void *fbp, int fbw, int fbh,
    00046                                     simplewidget_screen *swsp);
    00047
    00057 extern int simplewidget_screen_clear(simplewidget_screen sws,
    00058                                      int x, int y, int w, int h);
    00059
    00072 int simplewidget_screen_draw_rectangle(simplewidget_screen sws, int x, int y,
    00073                                        int w, int h, int r, int g, int b);
    00074
    00080 extern int simplewidget_screen_exit(simplewidget_screen sws);
    00081
    00097 extern int simplewidget_button_create(int x, int y, int w, int h,
    00098                                       int r, int g, int b, int font_height,
    00099                                       int border, char *txt,
    00100                                       simplewidget_button *swbp);
    00101
    00108 extern int simplewidget_button_show(simplewidget_button swb,
    00109                                     simplewidget_screen sws);
    00110
    00117 extern int simplewidget_button_hide(simplewidget_button swb,
    00118                                     simplewidget_screen sws);
    00119
    00126 extern int simplewidget_button_press(simplewidget_button swb,
    00127                                      simplewidget_screen sws);
    00128
    00135 extern int simplewidget_button_release(simplewidget_button swb,
    00136                                        simplewidget_screen sws);
    00137
    00143 extern int simplewidget_button_delete(simplewidget_button swb);
    00144
    00154 extern int simplewidget_text_create(int x, int y, int height, char *txt,
    00155                                     simplewidget_text *swtp);
    00156
    00163 extern int simplewidget_text_show(simplewidget_text swt,
    00164                                   simplewidget_screen sws);
    00165
    00171 extern int simplewidget_text_delete(simplewidget_text swt);
    00172
    00179 extern int simplewidget_jpeg_create(char *filename, simplewidget_jpeg *swjp);
    00180
    00189 extern int simplewidget_jpeg_show(simplewidget_jpeg swj,
    00190                                   simplewidget_screen sws, int x, int y);
    00191
    00197 extern int simplewidget_jpeg_delete(simplewidget_jpeg swj);
    00198
    00205 extern int simplewidget_png_create(char *filename, simplewidget_png *swpp);
    00206
    00215 extern int simplewidget_png_show(simplewidget_png swp, simplewidget_screen sws,
    00216                                  int x, int y);
    00217
    00223 extern int simplewidget_png_delete(simplewidget_png swp);
    00224
    00225 #if defined (__cplusplus)
    00226 }
    00227 #endif
    00228
    00229 #endif // _SIMPLEWIDGET_H

Copyright 2006, Texas Instruments Incorporated