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
4cffb2d0
Commit
4cffb2d0
authored
Apr 01, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Apr 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a skeleton dib driver.
parent
231ca429
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
69 additions
and
3 deletions
+69
-3
configure
configure
+5
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/gdi32/Makefile.in
+2
-0
bitmap.c
dlls/gdi32/bitmap.c
+18
-3
dc.c
dlls/gdi32/dc.c
+2
-0
dc.c
dlls/gdi32/dibdrv/dc.c
+0
-0
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+24
-0
gdi_private.h
dlls/gdi32/gdi_private.h
+17
-0
No files found.
configure
View file @
4cffb2d0
...
...
@@ -14858,6 +14858,8 @@ test "$srcdir" = "." || wine_fn_config_symlink tools/l_intl.nls
ac_config_links
=
"
$ac_config_links
wine:tools/winewrapper"
wine_fn_config_symlink wine
ac_config_commands
=
"
$ac_config_commands
dlls/gdi32/dibdrv"
ac_config_commands
=
"
$ac_config_commands
dlls/gdi32/enhmfdrv"
ac_config_commands
=
"
$ac_config_commands
dlls/gdi32/mfdrv"
...
...
@@ -16320,6 +16322,7 @@ do
"fonts/tahomabd.ttf") CONFIG_LINKS="
$CONFIG_LINKS
fonts/tahomabd.ttf:fonts/tahomabd.ttf" ;;
"tools/l_intl.nls") CONFIG_LINKS="
$CONFIG_LINKS
tools/l_intl.nls:tools/l_intl.nls" ;;
"wine") CONFIG_LINKS="
$CONFIG_LINKS
wine:tools/winewrapper" ;;
"dlls/gdi32/dibdrv") CONFIG_COMMANDS="
$CONFIG_COMMANDS
dlls/gdi32/dibdrv" ;;
"dlls/gdi32/enhmfdrv") CONFIG_COMMANDS="
$CONFIG_COMMANDS
dlls/gdi32/enhmfdrv" ;;
"dlls/gdi32/mfdrv") CONFIG_COMMANDS="
$CONFIG_COMMANDS
dlls/gdi32/mfdrv" ;;
"dlls/kernel32/nls") CONFIG_COMMANDS="
$CONFIG_COMMANDS
dlls/kernel32/nls" ;;
...
...
@@ -16957,6 +16960,8 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
case
$ac_file$ac_mode
in
"include/stamp-h":C) echo timestamp > include/stamp-h ;;
"dlls/gdi32/dibdrv":C) test -d "dlls/gdi32/dibdrv" || { {
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: creating dlls/gdi32/dibdrv" >&5
$as_echo
"
$as_me
: creating dlls/gdi32/dibdrv" >&6;}; as_dir="dlls/gdi32/dibdrv"; as_fn_mkdir_p; } ;;
"dlls/gdi32/enhmfdrv":C) test -d "dlls/gdi32/enhmfdrv" || { {
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: creating dlls/gdi32/enhmfdrv" >&5
$as_echo
"
$as_me
: creating dlls/gdi32/enhmfdrv" >&6;}; as_dir="dlls/gdi32/enhmfdrv"; as_fn_mkdir_p; } ;;
"dlls/gdi32/mfdrv":C) test -d "dlls/gdi32/mfdrv" || { {
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: creating dlls/gdi32/mfdrv" >&5
...
...
configure.ac
View file @
4cffb2d0
...
...
@@ -2347,6 +2347,7 @@ WINE_CONFIG_SYMLINK(fonts/tahomabd.ttf,,enable_fonts)
WINE_CONFIG_SYMLINK(tools/l_intl.nls)
WINE_CONFIG_SYMLINK(wine,tools/winewrapper)
WINE_CONFIG_EXTRA_DIR(dlls/gdi32/dibdrv)
WINE_CONFIG_EXTRA_DIR(dlls/gdi32/enhmfdrv)
WINE_CONFIG_EXTRA_DIR(dlls/gdi32/mfdrv)
WINE_CONFIG_EXTRA_DIR(dlls/kernel32/nls)
...
...
dlls/gdi32/Makefile.in
View file @
4cffb2d0
...
...
@@ -14,6 +14,7 @@ C_SRCS = \
clipping.c
\
dc.c
\
dib.c
\
dibdrv/dc.c
\
driver.c
\
enhmetafile.c
\
enhmfdrv/bitblt.c
\
...
...
@@ -44,6 +45,7 @@ C_SRCS = \
RC_SRCS
=
version.rc
EXTRASUBDIRS
=
\
dibdrv
\
enhmfdrv
\
mfdrv
...
...
dlls/gdi32/bitmap.c
View file @
4cffb2d0
...
...
@@ -592,7 +592,7 @@ BOOL BITMAP_SetOwnerDC( HBITMAP hbitmap, PHYSDEV physdev )
if
(
!
(
bitmap
=
GDI_GetObjPtr
(
hbitmap
,
OBJ_BITMAP
)))
return
FALSE
;
if
(
bitmap
->
funcs
!=
physdev
->
funcs
)
if
(
!
bitmap
->
dib
&&
bitmap
->
funcs
!=
physdev
->
funcs
)
{
/* we can only change from the null driver to some other driver */
if
(
bitmap
->
funcs
==
&
null_driver
)
...
...
@@ -627,7 +627,7 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, HDC hdc )
HGDIOBJ
ret
;
BITMAPOBJ
*
bitmap
;
DC
*
dc
;
PHYSDEV
physdev
;
PHYSDEV
physdev
=
NULL
,
old_physdev
=
NULL
;
if
(
!
(
dc
=
get_dc_ptr
(
hdc
)))
return
0
;
...
...
@@ -653,7 +653,17 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, HDC hdc )
goto
done
;
}
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSelectBitmap
);
old_physdev
=
GET_DC_PHYSDEV
(
dc
,
pSelectBitmap
);
if
(
old_physdev
==
&
dc
->
dibdrv
.
dev
)
pop_dc_driver
(
dc
,
old_physdev
);
if
(
bitmap
->
dib
)
{
physdev
=
&
dc
->
dibdrv
.
dev
;
push_dc_driver
(
dc
,
physdev
,
physdev
->
funcs
);
}
else
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSelectBitmap
);
if
(
!
BITMAP_SetOwnerDC
(
handle
,
physdev
))
{
...
...
@@ -682,6 +692,11 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, HDC hdc )
}
done:
if
(
!
ret
)
{
if
(
physdev
==
&
dc
->
dibdrv
.
dev
)
pop_dc_driver
(
dc
,
physdev
);
if
(
old_physdev
==
&
dc
->
dibdrv
.
dev
)
push_dc_driver
(
dc
,
old_physdev
,
old_physdev
->
funcs
);
}
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
dlls/gdi32/dc.c
View file @
4cffb2d0
...
...
@@ -79,6 +79,8 @@ DC *alloc_dc_ptr( WORD magic )
dc
->
nulldrv
.
funcs
=
&
null_driver
;
dc
->
nulldrv
.
next
=
NULL
;
dc
->
dibdrv
.
dev
.
funcs
=
&
dib_driver
;
dc
->
dibdrv
.
dev
.
next
=
NULL
;
dc
->
physDev
=
&
dc
->
nulldrv
;
dc
->
thread
=
GetCurrentThreadId
();
dc
->
refcount
=
1
;
...
...
dlls/gdi32/dibdrv/dc.c
0 → 100644
View file @
4cffb2d0
This diff is collapsed.
Click to expand it.
dlls/gdi32/dibdrv/dibdrv.h
0 → 100644
View file @
4cffb2d0
/*
* DIB driver include file.
*
* Copyright 2011 Huw Davies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
static
inline
dibdrv_physdev
*
get_dibdrv_pdev
(
PHYSDEV
dev
)
{
return
(
dibdrv_physdev
*
)
dev
;
}
dlls/gdi32/gdi_private.h
View file @
4cffb2d0
...
...
@@ -79,6 +79,21 @@ typedef struct gdi_physdev
HDC
hdc
;
}
*
PHYSDEV
;
typedef
struct
{
int
bit_count
,
width
,
height
;
int
stride
;
/* stride in bytes. Will be -ve for bottom-up dibs (see bits). */
void
*
bits
;
/* points to the top-left corner of the dib. */
DWORD
red_mask
,
green_mask
,
blue_mask
;
}
dib_info
;
typedef
struct
dibdrv_physdev
{
struct
gdi_physdev
dev
;
dib_info
dib
;
}
dibdrv_physdev
;
typedef
struct
tagDC_FUNCS
{
INT
(
CDECL
*
pAbortDoc
)(
PHYSDEV
);
...
...
@@ -246,6 +261,7 @@ typedef struct tagDC
GDIOBJHDR
header
;
HDC
hSelf
;
/* Handle to this DC */
struct
gdi_physdev
nulldrv
;
/* physdev for the null driver */
struct
dibdrv_physdev
dibdrv
;
/* physdev for the dib driver */
PHYSDEV
physDev
;
/* Physical device (driver-specific) */
DWORD
thread
;
/* thread owning the DC */
LONG
refcount
;
/* thread refcount */
...
...
@@ -391,6 +407,7 @@ extern int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, LONG *width,
/* driver.c */
extern
const
DC_FUNCTIONS
null_driver
DECLSPEC_HIDDEN
;
extern
const
DC_FUNCTIONS
dib_driver
DECLSPEC_HIDDEN
;
extern
const
DC_FUNCTIONS
*
DRIVER_get_display_driver
(
void
)
DECLSPEC_HIDDEN
;
extern
const
DC_FUNCTIONS
*
DRIVER_load_driver
(
LPCWSTR
name
)
DECLSPEC_HIDDEN
;
extern
BOOL
DRIVER_GetDriverName
(
LPCWSTR
device
,
LPWSTR
driver
,
DWORD
size
)
DECLSPEC_HIDDEN
;
...
...
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