Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
9018e13c
Commit
9018e13c
authored
Oct 12, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Add support for allocating purely client-side user handles.
parent
a1126242
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
95 additions
and
3 deletions
+95
-3
server_protocol.h
include/wine/server_protocol.h
+33
-2
protocol.def
server/protocol.def
+13
-0
request.h
server/request.h
+8
-0
trace.c
server/trace.c
+20
-0
user.c
server/user.c
+19
-0
user.h
server/user.h
+2
-1
No files found.
include/wine/server_protocol.h
View file @
9018e13c
...
...
@@ -115,8 +115,8 @@ typedef union
struct
{
int
code
;
client_ptr_t
string
;
data_size_t
length
;
client_ptr_t
string
;
}
output_string
;
struct
{
...
...
@@ -4614,6 +4614,31 @@ struct set_window_layered_info_reply
};
struct
alloc_user_handle_request
{
struct
request_header
__header
;
};
struct
alloc_user_handle_reply
{
struct
reply_header
__header
;
user_handle_t
handle
;
char
__pad_12
[
4
];
};
struct
free_user_handle_request
{
struct
request_header
__header
;
user_handle_t
handle
;
};
struct
free_user_handle_reply
{
struct
reply_header
__header
;
};
enum
request
{
REQ_new_process
,
...
...
@@ -4854,6 +4879,8 @@ enum request
REQ_add_fd_completion
,
REQ_get_window_layered_info
,
REQ_set_window_layered_info
,
REQ_alloc_user_handle
,
REQ_free_user_handle
,
REQ_NB_REQUESTS
};
...
...
@@ -5099,6 +5126,8 @@ union generic_request
struct
add_fd_completion_request
add_fd_completion_request
;
struct
get_window_layered_info_request
get_window_layered_info_request
;
struct
set_window_layered_info_request
set_window_layered_info_request
;
struct
alloc_user_handle_request
alloc_user_handle_request
;
struct
free_user_handle_request
free_user_handle_request
;
};
union
generic_reply
{
...
...
@@ -5342,8 +5371,10 @@ union generic_reply
struct
add_fd_completion_reply
add_fd_completion_reply
;
struct
get_window_layered_info_reply
get_window_layered_info_reply
;
struct
set_window_layered_info_reply
set_window_layered_info_reply
;
struct
alloc_user_handle_reply
alloc_user_handle_reply
;
struct
free_user_handle_reply
free_user_handle_reply
;
};
#define SERVER_PROTOCOL_VERSION 39
1
#define SERVER_PROTOCOL_VERSION 39
2
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
9018e13c
...
...
@@ -3224,3 +3224,16 @@ enum message_type
unsigned int alpha; /* alpha (0..255) */
unsigned int flags; /* LWA_* flags */
@END
/* Allocate an arbitrary user handle */
@REQ(alloc_user_handle)
@REPLY
user_handle_t handle; /* allocated handle */
@END
/* Free an arbitrary user handle */
@REQ(free_user_handle)
user_handle_t handle; /* handle to free*/
@END
server/request.h
View file @
9018e13c
...
...
@@ -349,6 +349,8 @@ DECL_HANDLER(set_completion_info);
DECL_HANDLER
(
add_fd_completion
);
DECL_HANDLER
(
get_window_layered_info
);
DECL_HANDLER
(
set_window_layered_info
);
DECL_HANDLER
(
alloc_user_handle
);
DECL_HANDLER
(
free_user_handle
);
#ifdef WANT_REQUEST_HANDLERS
...
...
@@ -593,6 +595,8 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(
req_handler
)
req_add_fd_completion
,
(
req_handler
)
req_get_window_layered_info
,
(
req_handler
)
req_set_window_layered_info
,
(
req_handler
)
req_alloc_user_handle
,
(
req_handler
)
req_free_user_handle
,
};
C_ASSERT
(
sizeof
(
affinity_t
)
==
8
);
...
...
@@ -1892,6 +1896,10 @@ C_ASSERT( FIELD_OFFSET(struct set_window_layered_info_request, color_key) == 16
C_ASSERT
(
FIELD_OFFSET
(
struct
set_window_layered_info_request
,
alpha
)
==
20
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_window_layered_info_request
,
flags
)
==
24
);
C_ASSERT
(
sizeof
(
struct
set_window_layered_info_request
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
alloc_user_handle_reply
,
handle
)
==
8
);
C_ASSERT
(
sizeof
(
struct
alloc_user_handle_reply
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
free_user_handle_request
,
handle
)
==
12
);
C_ASSERT
(
sizeof
(
struct
free_user_handle_request
)
==
16
);
#endif
/* WANT_REQUEST_HANDLERS */
...
...
server/trace.c
View file @
9018e13c
...
...
@@ -3780,6 +3780,20 @@ static void dump_set_window_layered_info_request( const struct set_window_layere
fprintf
(
stderr
,
", flags=%08x"
,
req
->
flags
);
}
static
void
dump_alloc_user_handle_request
(
const
struct
alloc_user_handle_request
*
req
)
{
}
static
void
dump_alloc_user_handle_reply
(
const
struct
alloc_user_handle_reply
*
req
)
{
fprintf
(
stderr
,
" handle=%08x"
,
req
->
handle
);
}
static
void
dump_free_user_handle_request
(
const
struct
free_user_handle_request
*
req
)
{
fprintf
(
stderr
,
" handle=%08x"
,
req
->
handle
);
}
static
const
dump_func
req_dumpers
[
REQ_NB_REQUESTS
]
=
{
(
dump_func
)
dump_new_process_request
,
(
dump_func
)
dump_get_new_process_info_request
,
...
...
@@ -4019,6 +4033,8 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_add_fd_completion_request
,
(
dump_func
)
dump_get_window_layered_info_request
,
(
dump_func
)
dump_set_window_layered_info_request
,
(
dump_func
)
dump_alloc_user_handle_request
,
(
dump_func
)
dump_free_user_handle_request
,
};
static
const
dump_func
reply_dumpers
[
REQ_NB_REQUESTS
]
=
{
...
...
@@ -4260,6 +4276,8 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
NULL
,
(
dump_func
)
dump_get_window_layered_info_reply
,
NULL
,
(
dump_func
)
dump_alloc_user_handle_reply
,
NULL
,
};
static
const
char
*
const
req_names
[
REQ_NB_REQUESTS
]
=
{
...
...
@@ -4501,6 +4519,8 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"add_fd_completion"
,
"get_window_layered_info"
,
"set_window_layered_info"
,
"alloc_user_handle"
,
"free_user_handle"
,
};
static
const
struct
...
...
server/user.c
View file @
9018e13c
...
...
@@ -20,6 +20,7 @@
#include "thread.h"
#include "user.h"
#include "request.h"
struct
user_handle
{
...
...
@@ -164,3 +165,21 @@ void *next_user_handle( user_handle_t *handle, enum user_object type )
}
return
NULL
;
}
/* allocate an arbitrary user handle */
DECL_HANDLER
(
alloc_user_handle
)
{
reply
->
handle
=
alloc_user_handle
(
NULL
,
USER_CLIENT
);
}
/* free an arbitrary user handle */
DECL_HANDLER
(
free_user_handle
)
{
struct
user_handle
*
entry
;
if
((
entry
=
handle_to_entry
(
req
->
handle
))
&&
entry
->
type
==
USER_CLIENT
)
free_user_entry
(
entry
);
else
set_error
(
STATUS_INVALID_HANDLE
);
}
server/user.h
View file @
9018e13c
...
...
@@ -35,7 +35,8 @@ struct clipboard;
enum
user_object
{
USER_WINDOW
=
1
,
USER_HOOK
USER_HOOK
,
USER_CLIENT
/* arbitrary client handle */
};
#define DESKTOP_ATOM ((atom_t)32769)
...
...
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