Structs

Home   Previous   Next


Contents

Details

struct EM_AspectRatio{
    int x; // horizontal rate
    int y; // vertical rate
};

struct EM_Canvas{                                                //attribute of background
    EM_BG_TYPE                            bgType;                //background type(image color or transparent)
    EM_BG_IMAGE_SHOW_TYPE    imageShowType;  //show type of background image(Tile Center or Stretch)
    EM_BG_ORIENTATION               orientation;           //show orientation(Horizontal or vertical)
    EM_BG_CUSTOMIZE                  customize;          //measure uint type(pixel inch or centimeter)
    EM_Color                                   color;                   //color of background
    char                                           fileName[256];      //image file name
    int                                              nWidth;               //width
    int                                              nHeight;              //height
};

struct EM_Point{  //point coordinate
    int x;                   //horizontal coordinate
    int y;                   //vertical coordinate
};

struct EM_Color{
    EM_BYTE r,g,b,a;//0..255
};

struct EM_Event{ //Mouse motion event structure
    EM_EVENT_TYPE      eventType;
    EM_EventKeyboard     keyboard;
    EM_EventMouse         mouse;
    EM_EventSystem        system;
};

struct EM_EventKeyboard{     //Keyboard event structure
    EM_KEY                 keyType;
    EM_EVENT_STATE state;      //STATE_DOWN or STATE_UP
};

struct EM_EventMouse{ //Mouse  event structure
    EM_MOUSE_TYPE        mouseType; // MOUSE_LEFT, MOUSE_MIDDLE or MOUSE_RIGHT
    EM_MOUSE_ACTIVE     active;         // MOUSE_MOVE, MOUSE_UP or MOUSE_DOWN
    EM_EVENT_STATE        state;         // PRESSED or RELEASED
    EM_Point point;
};

struct EM_EventSystem{
    int systemType;
    int layerID;
};

struct EM_FontTable{
    char name[100];     //face name
    char path[512];      //font file name
};

struct EM_Image{
    EM_BYTE* pPixels; //pointer of pixel
    int      nWidth;  //width
    int      nHeight; //height
    int      nBpp;    //bits per pixel
};

struct EM_Rect{   //rect area
    int x;         //horizontal coordinate
    int y;         //vertical coordinate
    int w;         //width
    int h;         //height
};

struct EM_Shadow{           //shadow structure
    bool     bIsShow;        //show or hide
    bool     bIsAboveCanvas; //show above canvas or not
    int      nOffsetX;       //offset of horizontal
    int      nOffsetY;       //offset of vertical
    int      nOpacity;       //opacity 0..255
    int      nSmooth;        //smooth 0..100
    EM_Color color;          //color
};

struct EM_Text{             //attribute of text
    char*         pText;     //text
    char*         pFaceName; //font face name
    int           nFontSize; //font size 0..n
    int           nStyle;    //font style
    EM_FONT_ORDER order;
    EM_Color      color;     //color of text
};