Woopsi 1.3
Nintendo DS Gui Framework
libwoopsi/include/woopsifuncs.h
00001 /* Contributed by Steven
00002  * 20071213
00003  * - Minor modifications and SDL code by Ant
00004  */
00005 
00006 #ifndef _WOOPSIFUNCS_H_
00007 #define _WOOPSIFUNCS_H_
00008 
00009 #include <nds.h>
00010 #include "framebuffer.h"
00011 #include "bitmapwrapper.h"
00012 #include "gadgetstyle.h"
00013 #include "newtopaz.h"
00014 #include "glyphfont.h"
00015 #include "defines.h"
00016 
00020 typedef struct PAD {
00021     union {
00022         struct {
00023             u16 A:1;            
00024             u16 B:1;            
00025             u16 Select:1;       
00026             u16 Start:1;        
00027             u16 Right:1;        
00028             u16 Left:1;         
00029             u16 Up:1;           
00030             u16 Down:1;         
00031             u16 R:1;            
00032             u16 L:1;            
00033             u16 X:1;            
00034             u16 Y:1;            
00035             u16 Touch:1;        
00036             u16 Lid:1;          
00037         };
00038         u16 AllKeys;            
00039     };
00040 } _pad;
00041 
00045 typedef struct PadHeldTimeStruct {
00046     s32 A;          
00047     s32 B;          
00048     s32 Select;     
00049     s32 Start;      
00050     s32 Right;      
00051     s32 Left;       
00052     s32 Up;         
00053     s32 Down;       
00054     s32 R;          
00055     s32 L;          
00056     s32 X;          
00057     s32 Y;          
00058 } PadHeldTime;
00059 
00063 typedef struct PADS {
00064    _pad Held;                   
00065    _pad Released;               
00066    _pad Newpress;               
00067     PadHeldTime HeldTime;       
00068 } _pads;
00069 
00073 typedef struct STYLUS {
00074     u8 Held:1;                  
00075     u8 Released:1;              
00076     u8 Newpress:1;              
00077     u8 unused:5;                
00078     s16 X;                      
00079     s16 Y;                      
00080     s16 Vx;                     
00081     s16 Vy;                     
00082     s16 oldVx;                  
00083     s16 oldVy;                  
00084     s16 Downtime;               
00085     s16 Uptime;                 
00086     s16 DblClick;               
00087 } _stylus;
00088 
00092 extern _pads Pad;
00093 
00097 extern _stylus Stylus;
00098 
00099 #ifdef USING_SDL
00100 
00101 #include <stdio.h>
00102 #include <stdlib.h>
00103 #include <string.h>
00104 #include <math.h>
00105 
00106 #else
00107 
00108 #include <nds/memory.h>
00109 #include <nds/bios.h>
00110 
00111 #endif
00112 
00116 extern WoopsiUI::FrameBuffer* frameBuffer[SCREEN_COUNT];
00117 
00121 extern WoopsiUI::GadgetStyle* defaultGadgetStyle;
00122 
00127 void initWoopsiGfxMode();
00128 
00132 void woopsiInitDefaultGadgetStyle();
00133 
00137 void woopsiFreeDefaultGadgetStyle();
00138 
00142 void woopsiFreeFrameBuffers();
00143 
00147 void woopsiWaitVBL();
00148 
00154 void woopsiUpdateInput();
00155 
00156 #endif
 All Classes Functions Variables Enumerations Enumerator