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
0d50965a
Commit
0d50965a
authored
Oct 16, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added requests to store window rectangles in the server.
parent
b662e11a
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
196 additions
and
1 deletion
+196
-1
server_protocol.h
include/wine/server_protocol.h
+46
-1
protocol.def
server/protocol.def
+35
-0
request.h
server/request.h
+6
-0
trace.c
server/trace.c
+51
-0
window.c
server/window.c
+57
-0
make_requests
tools/make_requests
+1
-0
No files found.
include/wine/server_protocol.h
View file @
0d50965a
...
...
@@ -140,6 +140,15 @@ typedef struct
}
property_data_t
;
typedef
struct
{
int
left
;
int
top
;
int
right
;
int
bottom
;
}
rectangle_t
;
...
...
@@ -1652,6 +1661,36 @@ struct get_window_tree_request
};
struct
set_window_rectangles_request
{
struct
request_header
__header
;
user_handle_t
handle
;
rectangle_t
window
;
rectangle_t
client
;
};
struct
get_window_rectangles_request
{
struct
request_header
__header
;
user_handle_t
handle
;
rectangle_t
window
;
rectangle_t
client
;
};
struct
get_windows_offset_request
{
struct
request_header
__header
;
user_handle_t
from
;
user_handle_t
to
;
int
x
;
int
y
;
};
struct
set_window_property_request
{
...
...
@@ -1823,6 +1862,9 @@ enum request
REQ_get_window_parents
,
REQ_get_window_children
,
REQ_get_window_tree
,
REQ_set_window_rectangles
,
REQ_get_window_rectangles
,
REQ_get_windows_offset
,
REQ_set_window_property
,
REQ_remove_window_property
,
REQ_get_window_property
,
...
...
@@ -1963,12 +2005,15 @@ union generic_request
struct
get_window_parents_request
get_window_parents
;
struct
get_window_children_request
get_window_children
;
struct
get_window_tree_request
get_window_tree
;
struct
set_window_rectangles_request
set_window_rectangles
;
struct
get_window_rectangles_request
get_window_rectangles
;
struct
get_windows_offset_request
get_windows_offset
;
struct
set_window_property_request
set_window_property
;
struct
remove_window_property_request
remove_window_property
;
struct
get_window_property_request
get_window_property
;
struct
get_window_properties_request
get_window_properties
;
};
#define SERVER_PROTOCOL_VERSION
59
#define SERVER_PROTOCOL_VERSION
60
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
0d50965a
...
...
@@ -141,6 +141,15 @@ typedef struct
handle_t handle; /* handle stored in property */
} property_data_t;
/* structure to specify window rectangles */
typedef struct
{
int left;
int top;
int right;
int bottom;
} rectangle_t;
/****************************************************************/
/* Request declarations */
...
...
@@ -1478,6 +1487,32 @@ enum message_type
user_handle_t last_child; /* last child */
@END
/* Set the window and client rectangles of a window */
@REQ(set_window_rectangles)
user_handle_t handle; /* handle to the window */
rectangle_t window; /* window rectangle */
rectangle_t client; /* client rectangle */
@END
/* Get the window and client rectangles of a window */
@REQ(get_window_rectangles)
user_handle_t handle; /* handle to the window */
@REPLY
rectangle_t window; /* window rectangle */
rectangle_t client; /* client rectangle */
@END
/* Get the coordinates offset between two windows */
@REQ(get_windows_offset)
user_handle_t from; /* handle to the first window */
user_handle_t to; /* handle to the second window */
@REPLY
int x; /* x coordinate offset */
int y; /* y coordinate offset */
@END
/* Set a window property */
@REQ(set_window_property)
...
...
server/request.h
View file @
0d50965a
...
...
@@ -194,6 +194,9 @@ DECL_HANDLER(get_window_info);
DECL_HANDLER
(
get_window_parents
);
DECL_HANDLER
(
get_window_children
);
DECL_HANDLER
(
get_window_tree
);
DECL_HANDLER
(
set_window_rectangles
);
DECL_HANDLER
(
get_window_rectangles
);
DECL_HANDLER
(
get_windows_offset
);
DECL_HANDLER
(
set_window_property
);
DECL_HANDLER
(
remove_window_property
);
DECL_HANDLER
(
get_window_property
);
...
...
@@ -333,6 +336,9 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(
req_handler
)
req_get_window_parents
,
(
req_handler
)
req_get_window_children
,
(
req_handler
)
req_get_window_tree
,
(
req_handler
)
req_set_window_rectangles
,
(
req_handler
)
req_get_window_rectangles
,
(
req_handler
)
req_get_windows_offset
,
(
req_handler
)
req_set_window_property
,
(
req_handler
)
req_remove_window_property
,
(
req_handler
)
req_get_window_property
,
...
...
server/trace.c
View file @
0d50965a
...
...
@@ -43,6 +43,12 @@ static void dump_uints( const int *ptr, int len )
fputc
(
'}'
,
stderr
);
}
static
void
dump_rectangle
(
const
void
*
req
,
const
rectangle_t
*
rect
)
{
fprintf
(
stderr
,
"{%d,%d;%d,%d}"
,
rect
->
left
,
rect
->
top
,
rect
->
right
,
rect
->
bottom
);
}
static
void
dump_context
(
const
CONTEXT
*
context
)
{
#ifdef __i386__
...
...
@@ -1761,6 +1767,42 @@ static void dump_get_window_tree_reply( const struct get_window_tree_request *re
fprintf
(
stderr
,
" last_child=%08x"
,
req
->
last_child
);
}
static
void
dump_set_window_rectangles_request
(
const
struct
set_window_rectangles_request
*
req
)
{
fprintf
(
stderr
,
" handle=%08x,"
,
req
->
handle
);
fprintf
(
stderr
,
" window="
);
dump_rectangle
(
req
,
&
req
->
window
);
fprintf
(
stderr
,
","
);
fprintf
(
stderr
,
" client="
);
dump_rectangle
(
req
,
&
req
->
client
);
}
static
void
dump_get_window_rectangles_request
(
const
struct
get_window_rectangles_request
*
req
)
{
fprintf
(
stderr
,
" handle=%08x"
,
req
->
handle
);
}
static
void
dump_get_window_rectangles_reply
(
const
struct
get_window_rectangles_request
*
req
)
{
fprintf
(
stderr
,
" window="
);
dump_rectangle
(
req
,
&
req
->
window
);
fprintf
(
stderr
,
","
);
fprintf
(
stderr
,
" client="
);
dump_rectangle
(
req
,
&
req
->
client
);
}
static
void
dump_get_windows_offset_request
(
const
struct
get_windows_offset_request
*
req
)
{
fprintf
(
stderr
,
" from=%08x,"
,
req
->
from
);
fprintf
(
stderr
,
" to=%08x"
,
req
->
to
);
}
static
void
dump_get_windows_offset_reply
(
const
struct
get_windows_offset_request
*
req
)
{
fprintf
(
stderr
,
" x=%d,"
,
req
->
x
);
fprintf
(
stderr
,
" y=%d"
,
req
->
y
);
}
static
void
dump_set_window_property_request
(
const
struct
set_window_property_request
*
req
)
{
fprintf
(
stderr
,
" window=%08x,"
,
req
->
window
);
...
...
@@ -1932,6 +1974,9 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_get_window_parents_request
,
(
dump_func
)
dump_get_window_children_request
,
(
dump_func
)
dump_get_window_tree_request
,
(
dump_func
)
dump_set_window_rectangles_request
,
(
dump_func
)
dump_get_window_rectangles_request
,
(
dump_func
)
dump_get_windows_offset_request
,
(
dump_func
)
dump_set_window_property_request
,
(
dump_func
)
dump_remove_window_property_request
,
(
dump_func
)
dump_get_window_property_request
,
...
...
@@ -2069,6 +2114,9 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_get_window_children_reply
,
(
dump_func
)
dump_get_window_tree_reply
,
(
dump_func
)
0
,
(
dump_func
)
dump_get_window_rectangles_reply
,
(
dump_func
)
dump_get_windows_offset_reply
,
(
dump_func
)
0
,
(
dump_func
)
dump_remove_window_property_reply
,
(
dump_func
)
dump_get_window_property_reply
,
(
dump_func
)
dump_get_window_properties_reply
,
...
...
@@ -2204,6 +2252,9 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"get_window_parents"
,
"get_window_children"
,
"get_window_tree"
,
"set_window_rectangles"
,
"get_window_rectangles"
,
"get_windows_offset"
,
"set_window_property"
,
"remove_window_property"
,
"get_window_property"
,
...
...
server/window.c
View file @
0d50965a
...
...
@@ -40,6 +40,8 @@ struct window
user_handle_t
handle
;
/* full handle for this window */
struct
thread
*
thread
;
/* thread owning the window */
atom_t
atom
;
/* class atom */
rectangle_t
window_rect
;
/* window rectangle */
rectangle_t
client_rect
;
/* client rectangle */
int
prop_inuse
;
/* number of in-use window properties */
int
prop_alloc
;
/* number of allocated window properties */
struct
property
*
properties
;
/* window properties array */
...
...
@@ -476,6 +478,61 @@ DECL_HANDLER(get_window_tree)
}
/* set the window and client rectangles of a window */
DECL_HANDLER
(
set_window_rectangles
)
{
struct
window
*
win
=
get_window
(
req
->
handle
);
if
(
win
)
{
win
->
window_rect
=
req
->
window
;
win
->
client_rect
=
req
->
client
;
}
}
/* get the window and client rectangles of a window */
DECL_HANDLER
(
get_window_rectangles
)
{
struct
window
*
win
=
get_window
(
req
->
handle
);
if
(
win
)
{
req
->
window
=
win
->
window_rect
;
req
->
client
=
win
->
client_rect
;
}
}
/* get the coordinates offset between two windows */
DECL_HANDLER
(
get_windows_offset
)
{
struct
window
*
win
;
req
->
x
=
req
->
y
=
0
;
if
(
req
->
from
)
{
if
(
!
(
win
=
get_window
(
req
->
from
)))
return
;
while
(
win
)
{
req
->
x
+=
win
->
client_rect
.
left
;
req
->
y
+=
win
->
client_rect
.
top
;
win
=
win
->
parent
;
}
}
if
(
req
->
to
)
{
if
(
!
(
win
=
get_window
(
req
->
to
)))
return
;
while
(
win
)
{
req
->
x
-=
win
->
client_rect
.
left
;
req
->
y
-=
win
->
client_rect
.
top
;
win
=
win
->
parent
;
}
}
}
/* set a window property */
DECL_HANDLER
(
set_window_property
)
{
...
...
tools/make_requests
View file @
0d50965a
...
...
@@ -18,6 +18,7 @@
"handle_t"
=>
"%d"
,
"atom_t"
=>
"%04x"
,
"user_handle_t"
=>
"%08x"
,
"rectangle_t"
=>
"&dump_rectangle"
,
);
my
@requests
=
();
...
...
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