1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
|
/*
Copyright (C) 2000, 2001 SMARTDATA, http://www.smartdata.ch/
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
None Port. This mean no graphics.
*/
#include "../waba.h"
g_error sucess = {ERRT_NONE,NULL};
g_error mkerror(unsigned char type, char *msg) {
g_error e = {type,msg};
return e;
}
g_error prerror(g_error e) {
if (e.type == ERRT_NONE) return sucess;
if (!e.msg) e.msg = "?";
printf("*** ERROR (");
switch (e.type) {
case ERRT_MEMORY: printf("MEMORY"); break;
case ERRT_IO: printf("IO"); break;
case ERRT_NETWORK: printf("NETWORK"); break;
case ERRT_BADPARAM: printf("BADPARAM"); break;
case ERRT_HANDLE: printf("HANDLE"); break;
case ERRT_INTERNAL: printf("INTERNAL"); break;
default: printf("?");
}
printf(") : %s\n",e.msg);
return e;
}
/*****************************************************************************/
void * hwr_init() {
int *dummy;
/* create the "dummy" main context */
dummy = xmalloc( sizeof( free ));
return dummy;
}
void hwr_release() {
// TODO:
}
void hwr_clear() {
}
void hwr_update() {
}
void hwr_pixel(int x,int y,devcolort c) {
}
void hwr_slab(int x,int y,int l,devcolort c) {
}
void hwr_bar(int x,int y,int l,devcolort c) {
}
void hwr_rect(int x,int y,int w,int h,devcolort c) {
if (w<=0) return;
if (h<=0) return;
}
void hwr_frame(int x,int y,int w,int h,devcolort c) {
hwr_slab(x,y,w,c);
hwr_slab(x,y+h-1,w,c);
hwr_bar(x,y+1,h-2,c);
hwr_bar(x+w-1,y+1,h-2,c);
}
/*****************************************************************************/
/*****************************************************************************/
void input_init(void (*request_quit)(void)) {
}
void input_release() {
}
/*****************************************************************************/
void ui_GetEvent(struct ui_Event *ui_event) {
}
/*****************************************************************************/
void ui_MainLoop() {
/* run the main loop */
printf( "Main Loop\n" );
}
/****************************************************************************
TIMEOUT RELATED
****************************************************************************/
void ui_TimeoutSet( WObject win, gint nbOfMillisecond ) {
/* set the time out until the next event */
/* no use of the win parameter, because we don't need to memorize the timer */
/* TO REMOVE : */
DPUTS( "ui_TimeoutSet()" );
}
/****************************************************************************
FONT RELATED
****************************************************************************/
/* implementation of function for creating a PicoGUI Font */
ui_FontType *ui_FontCreate( WObject font ) {
ui_FontType *aDummyFont;
/* create the pghandle for returning it */
aDummyFont = xmalloc( sizeof( ui_FontType ));
return aDummyFont;
}
void ui_FontDelete( ui_FontType * theFont ) {
/* delete the no more used font */
xfree( theFont );
}
gint ui_TextWidth( char *theText, ui_FontType *theFont ) {
/* return the width of the given text in the given font */
/* return a dummy value */
return 0;
}
gint ui_CharWidth( char theChar, ui_FontType *theFont ) {
/* return the width of the given char in the given font */
/* return a dummy value */
return 0;
}
void ui_FontSetProperties( ui_FontType *theFont, WObject fontMetrics ) {
/* set the ascent/descent/leading of the given font */
}
gint ui_FontGetYOffset( ui_FontType *theFont ) {
return 0;
}
/****************************************************************************
GRAPHICS RELATED
****************************************************************************/
ui_PixmapType *ui_createDrawingPixmap( ui_MainWindowType *mw, ui_Rectangle rect ) {
/* create a pixmap for drawing depending of the given main window mw and the given rect */
return NULL;
}
ui_GraphicsContextType *ui_createGC( WObject gr ) {
/* create the graphic context for the given graphics object */
return NULL;
}
void ui_deleteGC( ui_GraphicsContextType *theGC ) {
/* delete the given Graphics Context */
}
void ui_setTheDrawFunction( ui_GraphicsContextType *theGC, gint32 drawOp ) {
/* set the drawing function on the given widget depending on the given drawOp */
}
void ui_ClipTo( ui_GraphicsContextType *theGC, ui_Rectangle rect ){
/* set the clip to the given rectangle */
}
void ui_SetColor( ui_GraphicsContextType *theGC, gint red, gint green, gint blue ) {
/* set the color of the given gc to the given red/green/blue */
}
void ui_DrawPixel( ui_PixmapType *drawingPixmap, ui_GraphicsContextType *theGC, gint x, gint y ){
/* draw a pixel at the given x,y position */
}
void ui_DrawLine( ui_PixmapType *drawingPixmap, ui_GraphicsContextType *theGC, gint x1, gint y1, gint x2, gint y2 ) {
/* draw a line on gc fro x1,y1 to x2,y2 */
}
void ui_DrawText( ui_PixmapType *drawingPixmap, ui_GraphicsContextType *theGC, gint x, gint y, char *theText, ui_FontType *theFont ) {
/* draw theText with theFont at x,y on gc */
}
void ui_DrawFilledRect( ui_PixmapType *drawingPixmap, ui_GraphicsContextType *theGC, gint x, gint y, gint w, gint h ) {
/* draw a fillect rectangle at x,y and size w,h in gc */
}
void ui_GraphicsRepaint( WObject graphics, ui_PixmapType *drawingPixmap, ui_GraphicsContextType *theGC ) {
/* force the repaint of the gc */
}
/****************************************************************************
KEYS RELATED
****************************************************************************/
int32 ui_TranslateKey( Word chr ){
/* translate the code from chr to the corresponding code in "WABA key space" */
return chr;
}
/*****************************************************************************/
/* The End */
/*
Local Variables:
c-file-style: "smartdata"
End:
*/
|