Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0cd3ff6c
Commit
0cd3ff6c
authored
Dec 29, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Make the class opaque data a client_ptr_t instead of a void pointer.
parent
45c99193
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
16 deletions
+20
-16
class.c
dlls/user32/class.c
+2
-2
win.c
dlls/user32/win.c
+1
-1
server_protocol.h
include/wine/server_protocol.h
+4
-4
class.c
server/class.c
+2
-2
protocol.def
server/protocol.def
+3
-3
trace.c
server/trace.c
+7
-3
user.h
server/user.h
+1
-1
No files found.
dlls/user32/class.c
View file @
0cd3ff6c
...
...
@@ -357,7 +357,7 @@ static CLASS *CLASS_RegisterClass( LPCWSTR name, HINSTANCE hInstance, BOOL local
req
->
instance
=
wine_server_client_ptr
(
hInstance
);
req
->
extra
=
classExtra
;
req
->
win_extra
=
winExtra
;
req
->
client_ptr
=
classPtr
;
req
->
client_ptr
=
wine_server_client_ptr
(
classPtr
)
;
req
->
atom
=
classPtr
->
atomName
;
if
(
!
req
->
atom
&&
name
)
wine_server_add_data
(
req
,
name
,
strlenW
(
name
)
*
sizeof
(
WCHAR
)
);
ret
=
!
wine_server_call_err
(
req
);
...
...
@@ -628,7 +628,7 @@ BOOL WINAPI UnregisterClassW( LPCWSTR className, HINSTANCE hInstance )
req
->
instance
=
wine_server_client_ptr
(
hInstance
);
if
(
!
(
req
->
atom
=
get_int_atom_value
(
className
))
&&
className
)
wine_server_add_data
(
req
,
className
,
strlenW
(
className
)
*
sizeof
(
WCHAR
)
);
if
(
!
wine_server_call_err
(
req
))
classPtr
=
reply
->
client_ptr
;
if
(
!
wine_server_call_err
(
req
))
classPtr
=
wine_server_get_ptr
(
reply
->
client_ptr
)
;
}
SERVER_END_REQ
;
...
...
dlls/user32/win.c
View file @
0cd3ff6c
...
...
@@ -121,7 +121,7 @@ static WND *create_window_handle( HWND parent, HWND owner, LPCWSTR name,
full_parent
=
wine_server_ptr_handle
(
reply
->
parent
);
full_owner
=
wine_server_ptr_handle
(
reply
->
owner
);
extra_bytes
=
reply
->
extra
;
class
=
reply
->
class_ptr
;
class
=
wine_server_get_ptr
(
reply
->
class_ptr
)
;
}
}
SERVER_END_REQ
;
...
...
include/wine/server_protocol.h
View file @
0cd3ff6c
...
...
@@ -2789,7 +2789,7 @@ struct create_window_reply
user_handle_t
parent
;
user_handle_t
owner
;
int
extra
;
void
*
class_ptr
;
client_ptr_t
class_ptr
;
};
...
...
@@ -3661,7 +3661,7 @@ struct create_class_request
mod_handle_t
instance
;
int
extra
;
int
win_extra
;
void
*
client_ptr
;
client_ptr_t
client_ptr
;
/* VARARG(name,unicode_str); */
};
struct
create_class_reply
...
...
@@ -3682,7 +3682,7 @@ struct destroy_class_request
struct
destroy_class_reply
{
struct
reply_header
__header
;
void
*
client_ptr
;
client_ptr_t
client_ptr
;
};
...
...
@@ -5052,6 +5052,6 @@ union generic_reply
struct
set_window_layered_info_reply
set_window_layered_info_reply
;
};
#define SERVER_PROTOCOL_VERSION 3
59
#define SERVER_PROTOCOL_VERSION 3
60
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/class.c
View file @
0cd3ff6c
...
...
@@ -49,7 +49,7 @@ struct window_class
mod_handle_t
instance
;
/* module instance */
unsigned
int
style
;
/* class style */
int
win_extra
;
/* number of window extra bytes */
void
*
client_ptr
;
/* pointer to class in client address space */
client_ptr_t
client_ptr
;
/* pointer to class in client address space */
int
nb_extra_bytes
;
/* number of extra bytes */
char
extra_bytes
[
1
];
/* extra bytes storage */
};
...
...
@@ -141,7 +141,7 @@ atom_t get_class_atom( struct window_class *class )
return
class
->
atom
;
}
void
*
get_class_client_ptr
(
struct
window_class
*
class
)
client_ptr_t
get_class_client_ptr
(
struct
window_class
*
class
)
{
return
class
->
client_ptr
;
}
...
...
server/protocol.def
View file @
0cd3ff6c
...
...
@@ -2059,7 +2059,7 @@ enum message_type
user_handle_t parent; /* full handle of parent */
user_handle_t owner; /* full handle of owner */
int extra; /* number of extra bytes */
void*
class_ptr; /* pointer to class in client address space */
client_ptr_t
class_ptr; /* pointer to class in client address space */
@END
...
...
@@ -2646,7 +2646,7 @@ enum message_type
mod_handle_t instance; /* module instance */
int extra; /* number of extra class bytes */
int win_extra; /* number of window extra bytes */
void*
client_ptr; /* pointer to class in client address space */
client_ptr_t
client_ptr; /* pointer to class in client address space */
VARARG(name,unicode_str); /* class name */
@REPLY
atom_t atom; /* resulting class atom */
...
...
@@ -2659,7 +2659,7 @@ enum message_type
mod_handle_t instance; /* module instance */
VARARG(name,unicode_str); /* class name */
@REPLY
void*
client_ptr; /* pointer to class in client address space */
client_ptr_t
client_ptr; /* pointer to class in client address space */
@END
...
...
server/trace.c
View file @
0cd3ff6c
...
...
@@ -2623,7 +2623,8 @@ static void dump_create_window_reply( const struct create_window_reply *req )
fprintf
(
stderr
,
" parent=%08x,"
,
req
->
parent
);
fprintf
(
stderr
,
" owner=%08x,"
,
req
->
owner
);
fprintf
(
stderr
,
" extra=%d,"
,
req
->
extra
);
fprintf
(
stderr
,
" class_ptr=%p"
,
req
->
class_ptr
);
fprintf
(
stderr
,
" class_ptr="
);
dump_uint64
(
&
req
->
class_ptr
);
}
static
void
dump_destroy_window_request
(
const
struct
destroy_window_request
*
req
)
...
...
@@ -3327,7 +3328,9 @@ static void dump_create_class_request( const struct create_class_request *req )
fprintf
(
stderr
,
","
);
fprintf
(
stderr
,
" extra=%d,"
,
req
->
extra
);
fprintf
(
stderr
,
" win_extra=%d,"
,
req
->
win_extra
);
fprintf
(
stderr
,
" client_ptr=%p,"
,
req
->
client_ptr
);
fprintf
(
stderr
,
" client_ptr="
);
dump_uint64
(
&
req
->
client_ptr
);
fprintf
(
stderr
,
","
);
fprintf
(
stderr
,
" name="
);
dump_varargs_unicode_str
(
cur_size
);
}
...
...
@@ -3349,7 +3352,8 @@ static void dump_destroy_class_request( const struct destroy_class_request *req
static
void
dump_destroy_class_reply
(
const
struct
destroy_class_reply
*
req
)
{
fprintf
(
stderr
,
" client_ptr=%p"
,
req
->
client_ptr
);
fprintf
(
stderr
,
" client_ptr="
);
dump_uint64
(
&
req
->
client_ptr
);
}
static
void
dump_set_class_info_request
(
const
struct
set_class_info_request
*
req
)
...
...
server/user.h
View file @
0cd3ff6c
...
...
@@ -148,7 +148,7 @@ extern void release_class( struct window_class *class );
extern
int
is_desktop_class
(
struct
window_class
*
class
);
extern
int
is_hwnd_message_class
(
struct
window_class
*
class
);
extern
atom_t
get_class_atom
(
struct
window_class
*
class
);
extern
void
*
get_class_client_ptr
(
struct
window_class
*
class
);
extern
client_ptr_t
get_class_client_ptr
(
struct
window_class
*
class
);
/* windows station functions */
...
...
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