Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d6a91b7a
Commit
d6a91b7a
authored
Dec 02, 1998
by
Huw D M Davies
Committed by
Alexandre Julliard
Dec 02, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move OEM resources to the x11drv.
parent
a8745ea3
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
99 additions
and
30 deletions
+99
-30
init.c
graphics/metafiledrv/init.c
+1
-0
init.c
graphics/psdrv/init.c
+1
-0
init.c
graphics/win16drv/init.c
+1
-1
pen.c
graphics/win16drv/pen.c
+0
-1
Makefile.in
graphics/x11drv/Makefile.in
+1
-0
init.c
graphics/x11drv/init.c
+3
-0
oembitmap.c
graphics/x11drv/oembitmap.c
+28
-5
bitmap.h
include/bitmap.h
+0
-5
gdi.h
include/gdi.h
+6
-0
x11drv.h
include/x11drv.h
+3
-0
main.c
loader/main.c
+1
-4
Makefile.in
objects/Makefile.in
+0
-1
bitmap.c
objects/bitmap.c
+28
-9
cursoricon.c
objects/cursoricon.c
+26
-4
No files found.
graphics/metafiledrv/init.c
View file @
d6a91b7a
...
...
@@ -37,6 +37,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
NULL
,
/* pIntersectClipRect */
NULL
,
/* pIntersectVisRect */
MFDRV_LineTo
,
/* pLineTo */
NULL
,
/* pLoadOEMResource */
MFDRV_MoveToEx
,
/* pMoveToEx */
NULL
,
/* pOffsetClipRgn */
MFDRV_OffsetViewportOrg
,
/* pOffsetViewportOrg */
...
...
graphics/psdrv/init.c
View file @
d6a91b7a
...
...
@@ -42,6 +42,7 @@ static const DC_FUNCTIONS PSDRV_Funcs =
NULL
,
/* pIntersectClipRect */
NULL
,
/* pIntersectVisRect */
PSDRV_LineTo
,
/* pLineTo */
NULL
,
/* pLoadOEMResource */
PSDRV_MoveToEx
,
/* pMoveToEx */
NULL
,
/* pOffsetClipRgn */
NULL
,
/* pOffsetViewportOrg (optional) */
...
...
graphics/win16drv/init.c
View file @
d6a91b7a
...
...
@@ -12,7 +12,6 @@
#include "gdi.h"
#include "bitmap.h"
#include "heap.h"
#include "color.h"
#include "font.h"
#include "options.h"
#include "xmalloc.h"
...
...
@@ -66,6 +65,7 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
NULL
,
/* pIntersectClipRect */
NULL
,
/* pIntersectVisRect */
WIN16DRV_LineTo
,
/* pLineTo */
NULL
,
/* pLoadOEMResource */
WIN16DRV_MoveToEx
,
/* pMoveToEx */
NULL
,
/* pOffsetClipRgn */
NULL
,
/* pOffsetViewportOrgEx */
...
...
graphics/win16drv/pen.c
View file @
d6a91b7a
...
...
@@ -5,7 +5,6 @@
*/
#include "pen.h"
#include "color.h"
#include "win16drv.h"
#include "heap.h"
#include "debug.h"
...
...
graphics/x11drv/Makefile.in
View file @
d6a91b7a
...
...
@@ -14,6 +14,7 @@ C_SRCS = \
graphics.c
\
init.c
\
objects.c
\
oembitmap.c
\
pen.c
\
text.c
\
xfont.c
...
...
graphics/x11drv/init.c
View file @
d6a91b7a
...
...
@@ -42,6 +42,7 @@ static const DC_FUNCTIONS X11DRV_Funcs =
NULL
,
/* pIntersectClipRect */
NULL
,
/* pIntersectVisRect */
X11DRV_LineTo
,
/* pLineTo */
X11DRV_LoadOEMResource
,
/* pLoadOEMResource */
X11DRV_MoveToEx
,
/* pMoveToEx */
NULL
,
/* pOffsetClipRgn */
NULL
,
/* pOffsetViewportOrg (optional) */
...
...
@@ -120,6 +121,8 @@ BOOL32 X11DRV_Init(void)
if
(
!
COLOR_Init
()
)
return
FALSE
;
if
(
!
X11DRV_OBM_Init
()
)
return
FALSE
;
/* Finish up device caps */
#if 0
...
...
objects
/oembitmap.c
→
graphics/x11drv
/oembitmap.c
View file @
d6a91b7a
/*
*
GDI
OEM bitmap objects
*
X11DRV
OEM bitmap objects
*
* Copyright 1994, 1995 Alexandre Julliard
*
...
...
@@ -11,6 +11,7 @@
#include "ts_xutil.h"
#include "ts_xpm.h"
#include "gdi.h"
#include "x11drv.h"
#include "bitmap.h"
#include "callback.h"
#include "color.h"
...
...
@@ -399,7 +400,7 @@ static BOOL32 OBM_CreateBitmaps( OBM_BITMAP_DESCR *descr )
/***********************************************************************
* OBM_LoadBitmap
*/
HBITMAP16
OBM_LoadBitmap
(
WORD
id
)
static
HBITMAP16
OBM_LoadBitmap
(
WORD
id
)
{
OBM_BITMAP_DESCR
descr
;
...
...
@@ -427,7 +428,7 @@ HBITMAP16 OBM_LoadBitmap( WORD id )
/***********************************************************************
* OBM_LoadCursorIcon
*/
HGLOBAL16
OBM_LoadCursorIcon
(
WORD
id
,
BOOL32
fCursor
)
static
HGLOBAL16
OBM_LoadCursorIcon
(
WORD
id
,
BOOL32
fCursor
)
{
OBM_BITMAP_DESCR
descr
;
HGLOBAL16
handle
;
...
...
@@ -533,13 +534,35 @@ HGLOBAL16 OBM_LoadCursorIcon( WORD id, BOOL32 fCursor )
return
handle
;
}
/***********************************************************************
* X11DRV_LoadOEMResource
*
*/
HANDLE32
X11DRV_LoadOEMResource
(
WORD
resid
,
WORD
type
)
{
switch
(
type
)
{
case
OEM_BITMAP
:
return
OBM_LoadBitmap
(
resid
);
case
OEM_CURSOR
:
return
OBM_LoadCursorIcon
(
resid
,
TRUE
);
case
OEM_ICON
:
return
OBM_LoadCursorIcon
(
resid
,
FALSE
);
default:
ERR
(
x11drv
,
"Unknown type
\n
"
);
}
return
0
;
}
/***********************************************************************
* OBM_Init
*
X11DRV_
OBM_Init
*
* Initializes the OBM_Pixmaps_Data and OBM_Icons_Data struct
*/
BOOL32
OBM_Init
(
)
BOOL32
X11DRV_OBM_Init
(
void
)
{
if
(
TWEAK_WineLook
==
WIN31_LOOK
)
{
OBM_Pixmaps_Data
[
OBM_ZOOMD
-
OBM_FIRST
].
data
=
obm_zoomd
;
...
...
include/bitmap.h
View file @
d6a91b7a
...
...
@@ -76,9 +76,4 @@ extern void DIB_SelectDIBSection( DC *dc, BITMAPOBJ *bmp );
extern
void
DIB_FixColorsToLoadflags
(
BITMAPINFO
*
bmi
,
UINT32
loadflags
,
BYTE
pix
);
/* objects/oembitmap.c */
extern
BOOL32
OBM_Init
(
void
);
extern
HBITMAP16
OBM_LoadBitmap
(
WORD
id
);
extern
HGLOBAL16
OBM_LoadCursorIcon
(
WORD
id
,
BOOL32
fCursor
);
#endif
/* __WINE_BITMAP_H */
include/gdi.h
View file @
d6a91b7a
...
...
@@ -188,6 +188,7 @@ typedef struct tagDC_FUNCS
INT32
(
*
pIntersectClipRect
)(
DC
*
,
INT32
,
INT32
,
INT32
,
INT32
);
INT32
(
*
pIntersectVisRect
)(
DC
*
,
INT32
,
INT32
,
INT32
,
INT32
);
BOOL32
(
*
pLineTo
)(
DC
*
,
INT32
,
INT32
);
HANDLE32
(
*
pLoadOEMResource
)(
WORD
,
WORD
);
BOOL32
(
*
pMoveToEx
)(
DC
*
,
INT32
,
INT32
,
LPPOINT32
);
INT32
(
*
pOffsetClipRgn
)(
DC
*
,
INT32
,
INT32
);
BOOL32
(
*
pOffsetViewportOrg
)(
DC
*
,
INT32
,
INT32
);
...
...
@@ -233,6 +234,11 @@ typedef struct tagDC_FUNCS
INT32
(
*
pStretchDIBits
)(
DC
*
,
INT32
,
INT32
,
INT32
,
INT32
,
INT32
,
INT32
,
INT32
,
INT32
,
const
void
*
,
const
BITMAPINFO
*
,
UINT32
,
DWORD
);
}
DC_FUNCTIONS
;
/* LoadOEMResource types */
#define OEM_BITMAP 1
#define OEM_CURSOR 2
#define OEM_ICON 3
/* DC hook codes */
#define DCHC_INVALIDVISRGN 0x0001
#define DCHC_DELETEDC 0x0002
...
...
include/x11drv.h
View file @
d6a91b7a
...
...
@@ -137,12 +137,15 @@ extern INT32 X11DRV_DeviceBitmapBits( struct tagDC *dc, HBITMAP32 hbitmap,
WORD
fGet
,
UINT32
startscan
,
UINT32
lines
,
LPSTR
bits
,
LPBITMAPINFO
info
,
UINT32
coloruse
);
extern
HANDLE32
X11DRV_LoadOEMResource
(
WORD
id
,
WORD
type
);
/* X11 driver internal functions */
extern
BOOL32
X11DRV_BITMAP_Init
(
void
);
extern
BOOL32
X11DRV_BRUSH_Init
(
void
);
extern
BOOL32
X11DRV_DIB_Init
(
void
);
extern
BOOL32
X11DRV_FONT_Init
(
struct
tagDeviceCaps
*
);
extern
BOOL32
X11DRV_OBM_Init
(
void
);
struct
tagBITMAPOBJ
;
extern
XImage
*
X11DRV_BITMAP_GetXImage
(
const
struct
tagBITMAPOBJ
*
bmp
);
...
...
loader/main.c
View file @
d6a91b7a
...
...
@@ -192,10 +192,7 @@ BOOL32 WINAPI MAIN_UserInit(HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvRes
/* Initialize Wine tweaks */
if
(
!
TWEAK_Init
())
return
FALSE
;
/* Initialize OEM Bitmaps */
if
(
!
OBM_Init
())
return
FALSE
;
/* Global atom table initialisation */
/* Global atom table initialisation */
if
(
!
ATOM_Init
(
USER_HeapSel
))
return
FALSE
;
/* Initialize system colors and metrics*/
...
...
objects/Makefile.in
View file @
d6a91b7a
...
...
@@ -19,7 +19,6 @@ C_SRCS = \
gdiobj.c
\
linedda.c
\
metafile.c
\
oembitmap.c
\
palette.c
\
pen.c
\
region.c
\
...
...
objects/bitmap.c
View file @
d6a91b7a
...
...
@@ -215,14 +215,13 @@ HBITMAP32 WINAPI CreateCompatibleBitmap32( HDC32 hdc, INT32 width, INT32 height)
if
((
width
>
0x1000
)
||
(
height
>
0x1000
))
{
FIXME
(
bitmap
,
"got bad width %d or height %d, please look for reason
\n
"
,
width
,
height
);
return
0
;
}
else
{
hbmpRet
=
CreateBitmap32
(
width
,
height
,
1
,
dc
->
w
.
bitsPerPixel
,
NULL
);
if
(
dc
->
funcs
->
pCreateBitmap
)
dc
->
funcs
->
pCreateBitmap
(
hbmpRet
);
}
hbmpRet
=
CreateBitmap32
(
width
,
height
,
1
,
dc
->
w
.
bitsPerPixel
,
NULL
);
if
(
dc
->
funcs
->
pCreateBitmap
)
dc
->
funcs
->
pCreateBitmap
(
hbmpRet
);
TRACE
(
bitmap
,
"
\t\t
%04x
\n
"
,
hbmpRet
);
GDI_HEAP_UNLOCK
(
hdc
);
return
hbmpRet
;
}
...
...
@@ -587,8 +586,18 @@ HBITMAP16 WINAPI LoadBitmap16( HINSTANCE16 instance, SEGPTR name )
if
(
!
instance
)
/* OEM bitmap */
{
HDC32
hdc
;
DC
*
dc
;
if
(
HIWORD
((
int
)
name
))
return
0
;
return
OBM_LoadBitmap
(
LOWORD
((
int
)
name
)
);
hdc
=
CreateDC32A
(
"DISPLAY"
,
NULL
,
NULL
,
NULL
);
dc
=
DC_GetDCPtr
(
hdc
);
if
(
dc
->
funcs
->
pLoadOEMResource
)
hbitmap
=
dc
->
funcs
->
pLoadOEMResource
(
LOWORD
((
int
)
name
),
OEM_BITMAP
);
GDI_HEAP_UNLOCK
(
hdc
);
DeleteDC32
(
hdc
);
return
hbitmap
;
}
if
(
!
(
hRsrc
=
FindResource16
(
instance
,
name
,
RT_BITMAP16
)))
return
0
;
...
...
@@ -625,8 +634,18 @@ HBITMAP32 BITMAP_LoadBitmap32W(HINSTANCE32 instance,LPCWSTR name,
if
(
!
(
loadflags
&
LR_LOADFROMFILE
))
{
if
(
!
instance
)
/* OEM bitmap */
{
if
(
HIWORD
((
int
)
name
))
return
0
;
return
OBM_LoadBitmap
(
LOWORD
((
int
)
name
)
);
HDC32
hdc
;
DC
*
dc
;
if
(
HIWORD
((
int
)
name
))
return
0
;
hdc
=
CreateDC32A
(
"DISPLAY"
,
NULL
,
NULL
,
NULL
);
dc
=
DC_GetDCPtr
(
hdc
);
if
(
dc
->
funcs
->
pLoadOEMResource
)
hbitmap
=
dc
->
funcs
->
pLoadOEMResource
(
LOWORD
((
int
)
name
),
OEM_BITMAP
);
GDI_HEAP_UNLOCK
(
hdc
);
DeleteDC32
(
hdc
);
return
hbitmap
;
}
if
(
!
(
hRsrc
=
FindResource32W
(
instance
,
name
,
RT_BITMAP32W
)))
return
0
;
...
...
objects/cursoricon.c
View file @
d6a91b7a
...
...
@@ -37,6 +37,8 @@
#include "color.h"
#include "bitmap.h"
#include "cursoricon.h"
#include "dc.h"
#include "gdi.h"
#include "sysmetrics.h"
#include "global.h"
#include "module.h"
...
...
@@ -608,19 +610,29 @@ static HGLOBAL16 CURSORICON_Load16( HINSTANCE16 hInstance, SEGPTR name,
INT32
width
,
INT32
height
,
INT32
colors
,
BOOL32
fCursor
,
UINT32
loadflags
)
{
HGLOBAL16
handle
;
HGLOBAL16
handle
=
0
;
HRSRC16
hRsrc
;
CURSORICONDIRENTRY
dirEntry
;
if
(
!
hInstance
)
/* OEM cursor/icon */
{
HDC32
hdc
;
DC
*
dc
;
if
(
HIWORD
(
name
))
/* Check for '#xxx' name */
{
char
*
ptr
=
PTR_SEG_TO_LIN
(
name
);
if
(
ptr
[
0
]
!=
'#'
)
return
0
;
if
(
!
(
name
=
(
SEGPTR
)
atoi
(
ptr
+
1
)))
return
0
;
}
return
OBM_LoadCursorIcon
(
LOWORD
(
name
),
fCursor
);
hdc
=
CreateDC32A
(
"DISPLAY"
,
NULL
,
NULL
,
NULL
);
dc
=
DC_GetDCPtr
(
hdc
);
if
(
dc
->
funcs
->
pLoadOEMResource
)
handle
=
dc
->
funcs
->
pLoadOEMResource
(
LOWORD
(
name
),
fCursor
?
OEM_CURSOR
:
OEM_ICON
);
GDI_HEAP_UNLOCK
(
hdc
);
DeleteDC32
(
hdc
);
return
handle
;
}
/* Find the best entry in the directory */
...
...
@@ -653,7 +665,7 @@ HGLOBAL32 CURSORICON_Load32( HINSTANCE32 hInstance, LPCWSTR name,
int
width
,
int
height
,
int
colors
,
BOOL32
fCursor
,
UINT32
loadflags
)
{
HANDLE32
handle
,
h
=
0
;
HANDLE32
handle
=
0
,
h
=
0
;
HANDLE32
hRsrc
;
CURSORICONDIRENTRY
dirEntry
;
LPBYTE
bits
;
...
...
@@ -663,6 +675,9 @@ HGLOBAL32 CURSORICON_Load32( HINSTANCE32 hInstance, LPCWSTR name,
if
(
!
hInstance
)
/* OEM cursor/icon */
{
WORD
resid
;
HDC32
hdc
;
DC
*
dc
;
if
(
HIWORD
(
name
))
{
LPSTR
ansi
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
name
);
...
...
@@ -678,7 +693,14 @@ HGLOBAL32 CURSORICON_Load32( HINSTANCE32 hInstance, LPCWSTR name,
}
}
else
resid
=
LOWORD
(
name
);
return
OBM_LoadCursorIcon
(
resid
,
fCursor
);
hdc
=
CreateDC32A
(
"DISPLAY"
,
NULL
,
NULL
,
NULL
);
dc
=
DC_GetDCPtr
(
hdc
);
if
(
dc
->
funcs
->
pLoadOEMResource
)
handle
=
dc
->
funcs
->
pLoadOEMResource
(
resid
,
fCursor
?
OEM_CURSOR
:
OEM_ICON
);
GDI_HEAP_UNLOCK
(
hdc
);
DeleteDC32
(
hdc
);
return
handle
;
}
/* Find the best entry in the directory */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment