00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef LIQCANVAS_H
00027 #define LIQCANVAS_H
00028
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032
00033
00034 #include "liqfont.h"
00035 #include "liqimage.h"
00036 #include "liqcliprect.h"
00037
00038 typedef struct
00039 {
00040 int pixelwidth;
00041 int pixelheight;
00042
00043 int fullscreen;
00044 float scalew;
00045 float scaleh;
00046 int dpix;
00047 int dpiy;
00048 int keepalivealarmtime;
00049
00050 liqimage *surface;
00051 liqcliprect *cr;
00052
00053
00054
00055 void *customx11display;
00056 void *customx11window;
00057
00058 void *actualx11display;
00059 void *actualx11window;
00060
00061 void *x11info;
00062
00063 unsigned int expansion[16];
00064
00065 } liqcanvas;
00066
00067
00068
00069
00070
00071 typedef struct
00072 {
00073 unsigned int type;
00074 unsigned long ticks;
00075 unsigned int state;
00076 unsigned int button;
00077 unsigned int x;
00078 unsigned int y;
00079 unsigned int pressure;
00080 }
00081 LIQEVENT_MOUSE;
00082
00083 typedef struct
00084 {
00085 unsigned int type;
00086 unsigned long ticks;
00087 unsigned int state;
00088 unsigned int keycode;
00089 char keystring[16];
00090
00091 }
00092 LIQEVENT_KEY;
00093
00094
00095 typedef union
00096 {
00097 struct
00098 {
00099 unsigned int type;
00100 unsigned long ticks;
00101 unsigned int state;
00102 };
00103 LIQEVENT_MOUSE mouse;
00104 LIQEVENT_KEY key;
00105 }
00106 LIQEVENT;
00107
00108 #define LIQEVENT_TYPE_NONE -1
00109 #define LIQEVENT_TYPE_UNKNOWN 0
00110 #define LIQEVENT_TYPE_MOUSE 1
00111 #define LIQEVENT_TYPE_KEY 2
00112 #define LIQEVENT_TYPE_EXPOSE 3
00113 #define LIQEVENT_TYPE_REFRESHED 4
00114 #define LIQEVENT_TYPE_DIRTYFLAGSET 5
00115
00116 #define LIQEVENT_TYPE_RESIZE 6
00117
00118
00119
00120
00121 #define LIQEVENT_STATE_NONE -1
00122 #define LIQEVENT_STATE_UNKNOWN 0
00123 #define LIQEVENT_STATE_PRESS 1
00124 #define LIQEVENT_STATE_RELEASE 2
00125 #define LIQEVENT_STATE_MOVE 4
00126
00127
00128
00129
00130
00131 #define HILDON_APPVIEW_HEIGHT 420
00132 #define HILDON_APPVIEW_WIDTH 720
00133
00134
00135
00136 extern liqcanvas canvas;
00137
00138 int liqcanvas_isopen();
00139
00140
00141
00142
00143
00144 int liqcanvas_init_usecustomwindow( int pixelwidth,int pixelheight,void *customx11display,void *customx11window);
00145
00146
00147 int liqcanvas_init( int pixelwidth,int pixelheight,int fullscreen);
00148 int liqcanvas_eventcount();
00149 int liqcanvas_nextevent( LIQEVENT *ptrevent,int *dirtyflagptr);
00150 int liqcanvas_refreshdisplay();
00151
00152 int liqcanvas_close();
00153
00154 void liqcanvas_clear( unsigned char grey);
00155 liqcliprect * liqcanvas_getcliprect();
00156 liqimage * liqcanvas_getsurface();
00157
00158
00159 int liqcanvas_minimize();
00160 int liqcanvas_getwidth();
00161 int liqcanvas_getheight();
00162 int liqcanvas_getdpix();
00163 int liqcanvas_getdpiy();
00164 float liqcanvas_getscalew();
00165 float liqcanvas_getscaleh();
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182 #ifdef __cplusplus
00183 }
00184 #endif
00185
00186
00187 #endif