OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [services/] [gfx/] [mw/] [v2_0/] [include/] [microwin/] [windows.h] - Diff between revs 27 and 174

Only display areas with differences | Details | Blame | View Log

Rev 27 Rev 174
#ifndef _WINDOWS_H
#ifndef _WINDOWS_H
#define _WINDOWS_H
#define _WINDOWS_H
/* windows.h*/
/* windows.h*/
/*
/*
 * Copyright (c) 1999, 2000 Greg Haerr <greg@censoft.com>
 * Copyright (c) 1999, 2000 Greg Haerr <greg@censoft.com>
 *
 *
 * Microwindows Win32 API master public header file
 * Microwindows Win32 API master public header file
 */
 */
#ifdef __cplusplus
#ifdef __cplusplus
extern "C" {
extern "C" {
#endif
#endif
 
 
#include "mwtypes.h"
#include "mwtypes.h"
#include "windef.h"
#include "windef.h"
#include "wingdi.h"
#include "wingdi.h"
#include "winfont.h"
#include "winfont.h"
#include "winkbd.h"
#include "winkbd.h"
#include "winuser.h"    /* now includes winctl.h for resource compiler*/
#include "winuser.h"    /* now includes winctl.h for resource compiler*/
 
 
/* external routines*/
/* external routines*/
int WINAPI      WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
int WINAPI      WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
                        LPSTR lpCmdLine, int nShowCmd);
                        LPSTR lpCmdLine, int nShowCmd);
 
 
int             MwUserInit(int ac, char **av);
int             MwUserInit(int ac, char **av);
 
 
/* Internal Microwindows non-win32 definitions*/
/* Internal Microwindows non-win32 definitions*/
 
 
/* GDI Objects*/
/* GDI Objects*/
 
 
typedef struct {                        /* GDI object hdr*/
typedef struct {                        /* GDI object hdr*/
        int             type;           /* OBJ_xxx type*/
        int             type;           /* OBJ_xxx type*/
        BOOL            stockobj;       /* TRUE if stock (unallocated) object*/
        BOOL            stockobj;       /* TRUE if stock (unallocated) object*/
} MWGDIOBJHDR;
} MWGDIOBJHDR;
 
 
/* gdiobj*/
/* gdiobj*/
struct hgdiobj {
struct hgdiobj {
        MWGDIOBJHDR     hdr;            /* all gdi object start with this hdr*/
        MWGDIOBJHDR     hdr;            /* all gdi object start with this hdr*/
        /* additional data...*/         /* allocated per object type*/
        /* additional data...*/         /* allocated per object type*/
};
};
 
 
typedef struct {
typedef struct {
        MWGDIOBJHDR     hdr;
        MWGDIOBJHDR     hdr;
        int             style;          /* pen style*/
        int             style;          /* pen style*/
        COLORREF        color;          /* pen color*/
        COLORREF        color;          /* pen color*/
} MWPENOBJ;
} MWPENOBJ;
 
 
typedef struct {
typedef struct {
        MWGDIOBJHDR     hdr;
        MWGDIOBJHDR     hdr;
        int             style;          /* brush style*/
        int             style;          /* brush style*/
        COLORREF        color;          /* brush color*/
        COLORREF        color;          /* brush color*/
} MWBRUSHOBJ;
} MWBRUSHOBJ;
 
 
typedef struct {
typedef struct {
        MWGDIOBJHDR     hdr;
        MWGDIOBJHDR     hdr;
        PMWFONT         pfont;          /* allocated font*/
        PMWFONT         pfont;          /* allocated font*/
        char            name[32];       /* font name (stock objects only)*/
        char            name[32];       /* font name (stock objects only)*/
} MWFONTOBJ;
} MWFONTOBJ;
 
 
typedef struct {
typedef struct {
        MWGDIOBJHDR     hdr;
        MWGDIOBJHDR     hdr;
        int             width;          /* width*/
        int             width;          /* width*/
        int             height;         /* height*/
        int             height;         /* height*/
        int             planes;         /* # planes*/
        int             planes;         /* # planes*/
        int             bpp;            /* bits per pixel*/
        int             bpp;            /* bits per pixel*/
        int             linelen;        /* bytes per line*/
        int             linelen;        /* bytes per line*/
        int             size;           /* allocated size in bytes*/
        int             size;           /* allocated size in bytes*/
        char            bits[1];        /* beginning of bitmap*/
        char            bits[1];        /* beginning of bitmap*/
} MWBITMAPOBJ;
} MWBITMAPOBJ;
 
 
typedef struct {
typedef struct {
        MWGDIOBJHDR     hdr;
        MWGDIOBJHDR     hdr;
        MWCLIPREGION  * rgn;            /* clip region*/
        MWCLIPREGION  * rgn;            /* clip region*/
} MWRGNOBJ;
} MWRGNOBJ;
 
 
/* device context*/
/* device context*/
struct hdc {
struct hdc {
        struct _mwscreendevice *psd;    /* screen or memory device*/
        struct _mwscreendevice *psd;    /* screen or memory device*/
        HWND            hwnd;           /* associated window*/
        HWND            hwnd;           /* associated window*/
        DWORD           flags;          /* clipping flags*/
        DWORD           flags;          /* clipping flags*/
        int             bkmode;         /* background mode*/
        int             bkmode;         /* background mode*/
        UINT            textalign;      /* text alignment flags*/
        UINT            textalign;      /* text alignment flags*/
        MWCOLORVAL      bkcolor;        /* text background color*/
        MWCOLORVAL      bkcolor;        /* text background color*/
        MWCOLORVAL      textcolor;      /* text color*/
        MWCOLORVAL      textcolor;      /* text color*/
        MWBRUSHOBJ *    brush;          /* current brush*/
        MWBRUSHOBJ *    brush;          /* current brush*/
        MWPENOBJ *      pen;            /* current pen*/
        MWPENOBJ *      pen;            /* current pen*/
        MWFONTOBJ *     font;           /* current font*/
        MWFONTOBJ *     font;           /* current font*/
        MWBITMAPOBJ *   bitmap;         /* current bitmap (mem dc's only)*/
        MWBITMAPOBJ *   bitmap;         /* current bitmap (mem dc's only)*/
        MWRGNOBJ *      region;         /* user specified clip region*/
        MWRGNOBJ *      region;         /* user specified clip region*/
        int             drawmode;       /* rop2 drawing mode */
        int             drawmode;       /* rop2 drawing mode */
        POINT           pt;             /* current pen pos in client coords*/
        POINT           pt;             /* current pen pos in client coords*/
};
};
 
 
/* cursor*/
/* cursor*/
struct hcursor {
struct hcursor {
        int             usecount;       /* use counter */
        int             usecount;       /* use counter */
        MWCURSOR        cursor;         /* software cursor definition*/
        MWCURSOR        cursor;         /* software cursor definition*/
};
};
 
 
/* built-in scrollbars*/
/* built-in scrollbars*/
typedef struct {
typedef struct {
        int             minPos;        /* min value of scroll range.*/
        int             minPos;        /* min value of scroll range.*/
        int             maxPos;        /* max value of scroll range.*/
        int             maxPos;        /* max value of scroll range.*/
        int             curPos;        /* current scroll pos.*/
        int             curPos;        /* current scroll pos.*/
        int             pageStep;      /* steps per page.*/
        int             pageStep;      /* steps per page.*/
        int             barStart;      /* start pixel of bar.*/
        int             barStart;      /* start pixel of bar.*/
        int             barLen;        /* length of bar.*/
        int             barLen;        /* length of bar.*/
        int             status;        /* status of scroll bar.*/
        int             status;        /* status of scroll bar.*/
        RECT            rc;            /* screen coordinates position*/
        RECT            rc;            /* screen coordinates position*/
} MWSCROLLBARINFO, *PMWSCROLLBARINFO;
} MWSCROLLBARINFO, *PMWSCROLLBARINFO;
 
 
/* window*/
/* window*/
struct hwnd {
struct hwnd {
        RECT            winrect;        /* window rect in screen coords*/
        RECT            winrect;        /* window rect in screen coords*/
        RECT            clirect;        /* client rect in screen coords*/
        RECT            clirect;        /* client rect in screen coords*/
        RECT            restorerc;      /* restore rect from maximized*/
        RECT            restorerc;      /* restore rect from maximized*/
        DWORD           style;          /* window style*/
        DWORD           style;          /* window style*/
        DWORD           exstyle;        /* window extended style*/
        DWORD           exstyle;        /* window extended style*/
        PWNDCLASS       pClass;         /* window class*/
        PWNDCLASS       pClass;         /* window class*/
        struct hwnd     *parent;        /* z-order parent window */
        struct hwnd     *parent;        /* z-order parent window */
        struct hwnd     *owner;         /* owner window*/
        struct hwnd     *owner;         /* owner window*/
        struct hwnd     *children;      /* first child window */
        struct hwnd     *children;      /* first child window */
        struct hwnd     *siblings;      /* next sibling window */
        struct hwnd     *siblings;      /* next sibling window */
        struct hwnd     *next;          /* next window in complete list */
        struct hwnd     *next;          /* next window in complete list */
        struct hcursor  *cursor;        /* cursor for this window */
        struct hcursor  *cursor;        /* cursor for this window */
        struct hdc *    owndc;          /* owndc if CS_OWNDC*/
        struct hdc *    owndc;          /* owndc if CS_OWNDC*/
        int             unmapcount;     /* count of reasons not really mapped */
        int             unmapcount;     /* count of reasons not really mapped */
        int             id;             /* window id */
        int             id;             /* window id */
        CHAR            szTitle[64];    /* window title*/
        CHAR            szTitle[64];    /* window title*/
        int             gotPaintMsg;    /* window had WM_PAINT PostMessage*/
        int             gotPaintMsg;    /* window had WM_PAINT PostMessage*/
        int             paintSerial;    /* experimental serial # for alphblend*/
        int             paintSerial;    /* experimental serial # for alphblend*/
        int             paintNC;        /* experimental NC paint handling*/
        int             paintNC;        /* experimental NC paint handling*/
        MWCLIPREGION *  update;         /* update region in screen coords*/
        MWCLIPREGION *  update;         /* update region in screen coords*/
        DWORD           userdata;       /* setwindowlong user data*/
        DWORD           userdata;       /* setwindowlong user data*/
        DWORD           userdata2;      /* additional user data (will remove)*/
        DWORD           userdata2;      /* additional user data (will remove)*/
        MWSCROLLBARINFO hscroll;        /* NC scrollbars*/
        MWSCROLLBARINFO hscroll;        /* NC scrollbars*/
        MWSCROLLBARINFO vscroll;
        MWSCROLLBARINFO vscroll;
        int             nextrabytes;    /* # window extra bytes*/
        int             nextrabytes;    /* # window extra bytes*/
        char            extrabytes[1];  /* window extra bytes - must be last*/
        char            extrabytes[1];  /* window extra bytes - must be last*/
};
};
 
 
/* misc apis - will move to another header file*/
/* misc apis - will move to another header file*/
DWORD WINAPI    GetTickCount(VOID);
DWORD WINAPI    GetTickCount(VOID);
VOID WINAPI     Sleep(DWORD dwMilliseconds);
VOID WINAPI     Sleep(DWORD dwMilliseconds);
 
 
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
 
 
#endif /* _WINDOWS_H*/
#endif /* _WINDOWS_H*/
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.