diff options
author | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
commit | 07274513e984f0b5544586c74508ccd16e7dcafa (patch) | |
tree | b32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/evas/src/modules/engines/software_gdi/evas_gdi_main.c | |
parent | Added Irrlicht 1.8, but without all the Windows binaries. (diff) | |
download | SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2 SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz |
Remove EFL, since it's been released now.
Diffstat (limited to 'libraries/evas/src/modules/engines/software_gdi/evas_gdi_main.c')
-rw-r--r-- | libraries/evas/src/modules/engines/software_gdi/evas_gdi_main.c | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/libraries/evas/src/modules/engines/software_gdi/evas_gdi_main.c b/libraries/evas/src/modules/engines/software_gdi/evas_gdi_main.c deleted file mode 100644 index 4a63959..0000000 --- a/libraries/evas/src/modules/engines/software_gdi/evas_gdi_main.c +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | #include "evas_common.h" | ||
2 | #include "evas_engine.h" | ||
3 | |||
4 | |||
5 | int | ||
6 | evas_software_gdi_init (HWND window, | ||
7 | int depth, | ||
8 | unsigned int borderless, | ||
9 | unsigned int fullscreen __UNUSED__, | ||
10 | unsigned int region, | ||
11 | Outbuf *buf) | ||
12 | { | ||
13 | if (!window) | ||
14 | { | ||
15 | ERR("[Engine] [GDI] Window is NULL"); | ||
16 | return 0; | ||
17 | } | ||
18 | |||
19 | buf->priv.gdi.window = window; | ||
20 | buf->priv.gdi.dc = GetDC(window); | ||
21 | buf->priv.gdi.borderless = borderless; | ||
22 | buf->priv.gdi.region = region; | ||
23 | if (!buf->priv.gdi.dc) | ||
24 | { | ||
25 | ERR("[Engine] [GDI] Can not get DC"); | ||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | /* FIXME: check depth */ | ||
30 | if (depth != GetDeviceCaps(buf->priv.gdi.dc, BITSPIXEL)) | ||
31 | { | ||
32 | ERR("[Engine] [GDI] no compatible depth"); | ||
33 | ReleaseDC(window, buf->priv.gdi.dc); | ||
34 | return 0; | ||
35 | } | ||
36 | buf->priv.gdi.depth = depth; | ||
37 | |||
38 | /* FIXME: support fullscreen */ | ||
39 | |||
40 | buf->priv.gdi.bitmap_info = (BITMAPINFO_GDI *)malloc(sizeof(BITMAPINFO_GDI)); | ||
41 | if (!buf->priv.gdi.bitmap_info) | ||
42 | { | ||
43 | ERR("[Engine] [GDI] Can not allocate bitmap info"); | ||
44 | ReleaseDC(window, buf->priv.gdi.dc); | ||
45 | return 0; | ||
46 | } | ||
47 | |||
48 | buf->priv.gdi.bitmap_info->bih.biSize = sizeof(BITMAPINFOHEADER); | ||
49 | buf->priv.gdi.bitmap_info->bih.biWidth = buf->width; | ||
50 | buf->priv.gdi.bitmap_info->bih.biHeight = -buf->height; | ||
51 | buf->priv.gdi.bitmap_info->bih.biPlanes = 1; | ||
52 | buf->priv.gdi.bitmap_info->bih.biSizeImage = (buf->priv.gdi.depth >> 3) * buf->width * buf->height; | ||
53 | buf->priv.gdi.bitmap_info->bih.biXPelsPerMeter = 0; | ||
54 | buf->priv.gdi.bitmap_info->bih.biYPelsPerMeter = 0; | ||
55 | buf->priv.gdi.bitmap_info->bih.biClrUsed = 0; | ||
56 | buf->priv.gdi.bitmap_info->bih.biClrImportant = 0; | ||
57 | buf->priv.gdi.bitmap_info->bih.biBitCount = buf->priv.gdi.depth; | ||
58 | buf->priv.gdi.bitmap_info->bih.biCompression = BI_BITFIELDS; | ||
59 | |||
60 | switch (depth) | ||
61 | { | ||
62 | case 16: | ||
63 | buf->priv.gdi.bitmap_info->masks[0] = 0x0000f800; | ||
64 | buf->priv.gdi.bitmap_info->masks[1] = 0x000007e0; | ||
65 | buf->priv.gdi.bitmap_info->masks[2] = 0x0000001f; | ||
66 | break; | ||
67 | case 32: | ||
68 | buf->priv.gdi.bitmap_info->masks[0] = 0x00ff0000; | ||
69 | buf->priv.gdi.bitmap_info->masks[1] = 0x0000ff00; | ||
70 | buf->priv.gdi.bitmap_info->masks[2] = 0x000000ff; | ||
71 | break; | ||
72 | default: | ||
73 | ERR("[Engine] [GDI] wrong depth"); | ||
74 | free(buf->priv.gdi.bitmap_info); | ||
75 | ReleaseDC(window, buf->priv.gdi.dc); | ||
76 | return 0; | ||
77 | } | ||
78 | |||
79 | return 1; | ||
80 | } | ||
81 | |||
82 | void | ||
83 | evas_software_gdi_shutdown(Outbuf *buf) | ||
84 | { | ||
85 | if (!buf) | ||
86 | return; | ||
87 | |||
88 | free(buf->priv.gdi.bitmap_info); | ||
89 | ReleaseDC(buf->priv.gdi.window, buf->priv.gdi.dc); | ||
90 | if (buf->priv.gdi.regions) | ||
91 | DeleteObject(buf->priv.gdi.regions); | ||
92 | } | ||
93 | |||
94 | void | ||
95 | evas_software_gdi_bitmap_resize(Outbuf *buf) | ||
96 | { | ||
97 | buf->priv.gdi.bitmap_info->bih.biWidth = buf->width; | ||
98 | buf->priv.gdi.bitmap_info->bih.biHeight = -buf->height; | ||
99 | buf->priv.gdi.bitmap_info->bih.biSizeImage = (buf->priv.gdi.depth >> 3) * buf->width * buf->height; | ||
100 | } | ||