Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
weston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Agner
weston
Commits
62d6d56a
Commit
62d6d56a
authored
Feb 05, 2019
by
Michael Teyfel
Committed by
Daniel Stone
Feb 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ivi-shell: added libweston-desktop-api implementation
Signed-off-by:
Michael Teyfel
<
mteyfel@de.adit-jv.com
>
parent
c04188e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
155 additions
and
0 deletions
+155
-0
ivi-shell/ivi-shell.c
ivi-shell/ivi-shell.c
+155
-0
No files found.
ivi-shell/ivi-shell.c
View file @
62d6d56a
...
...
@@ -454,6 +454,161 @@ shell_add_bindings(struct weston_compositor *compositor,
shell
);
}
/*
* libweston-desktop
*/
static
void
desktop_surface_ping_timeout
(
struct
weston_desktop_client
*
client
,
void
*
user_data
)
{
/* Not supported */
}
static
void
desktop_surface_pong
(
struct
weston_desktop_client
*
client
,
void
*
user_data
)
{
/* Not supported */
}
static
void
desktop_surface_added
(
struct
weston_desktop_surface
*
surface
,
void
*
user_data
)
{
struct
ivi_shell
*
shell
=
(
struct
ivi_shell
*
)
user_data
;
struct
ivi_layout_surface
*
layout_surface
;
struct
ivi_shell_surface
*
ivisurf
;
struct
weston_surface
*
weston_surf
=
weston_desktop_surface_get_surface
(
surface
);
layout_surface
=
ivi_layout_desktop_surface_create
(
weston_surf
);
if
(
!
layout_surface
)
{
return
;
}
layout_surface
->
weston_desktop_surface
=
surface
;
ivisurf
=
zalloc
(
sizeof
*
ivisurf
);
if
(
!
ivisurf
)
{
return
;
}
ivisurf
->
shell
=
shell
;
ivisurf
->
id_surface
=
IVI_INVALID_ID
;
ivisurf
->
width
=
0
;
ivisurf
->
height
=
0
;
ivisurf
->
layout_surface
=
layout_surface
;
ivisurf
->
surface
=
weston_surf
;
weston_desktop_surface_set_user_data
(
surface
,
ivisurf
);
}
static
void
desktop_surface_removed
(
struct
weston_desktop_surface
*
surface
,
void
*
user_data
)
{
struct
ivi_shell_surface
*
ivisurf
=
(
struct
ivi_shell_surface
*
)
weston_desktop_surface_get_user_data
(
surface
);
assert
(
ivisurf
!=
NULL
);
if
(
ivisurf
->
layout_surface
)
layout_surface_cleanup
(
ivisurf
);
}
static
void
desktop_surface_committed
(
struct
weston_desktop_surface
*
surface
,
int32_t
sx
,
int32_t
sy
,
void
*
user_data
)
{
struct
ivi_shell_surface
*
ivisurf
=
(
struct
ivi_shell_surface
*
)
weston_desktop_surface_get_user_data
(
surface
);
struct
weston_surface
*
weston_surf
=
weston_desktop_surface_get_surface
(
surface
);
if
(
!
ivisurf
)
return
;
if
(
weston_surf
->
width
==
0
||
weston_surf
->
height
==
0
)
return
;
if
(
ivisurf
->
width
!=
weston_surf
->
width
||
ivisurf
->
height
!=
weston_surf
->
height
)
{
ivisurf
->
width
=
weston_surf
->
width
;
ivisurf
->
height
=
weston_surf
->
height
;
ivi_layout_desktop_surface_configure
(
ivisurf
->
layout_surface
,
weston_surf
->
width
,
weston_surf
->
height
);
}
}
static
void
desktop_surface_move
(
struct
weston_desktop_surface
*
surface
,
struct
weston_seat
*
seat
,
uint32_t
serial
,
void
*
user_data
)
{
/* Not supported */
}
static
void
desktop_surface_resize
(
struct
weston_desktop_surface
*
surface
,
struct
weston_seat
*
seat
,
uint32_t
serial
,
enum
weston_desktop_surface_edge
edges
,
void
*
user_data
)
{
/* Not supported */
}
static
void
desktop_surface_fullscreen_requested
(
struct
weston_desktop_surface
*
surface
,
bool
fullscreen
,
struct
weston_output
*
output
,
void
*
user_data
)
{
/* Not supported */
}
static
void
desktop_surface_maximized_requested
(
struct
weston_desktop_surface
*
surface
,
bool
maximized
,
void
*
user_data
)
{
/* Not supported */
}
static
void
desktop_surface_minimized_requested
(
struct
weston_desktop_surface
*
surface
,
void
*
user_data
)
{
/* Not supported */
}
static
void
desktop_surface_set_xwayland_position
(
struct
weston_desktop_surface
*
surface
,
int32_t
x
,
int32_t
y
,
void
*
user_data
)
{
/* Not supported */
}
static
const
struct
weston_desktop_api
shell_desktop_api
=
{
.
struct_size
=
sizeof
(
struct
weston_desktop_api
),
.
ping_timeout
=
desktop_surface_ping_timeout
,
.
pong
=
desktop_surface_pong
,
.
surface_added
=
desktop_surface_added
,
.
surface_removed
=
desktop_surface_removed
,
.
committed
=
desktop_surface_committed
,
.
move
=
desktop_surface_move
,
.
resize
=
desktop_surface_resize
,
.
fullscreen_requested
=
desktop_surface_fullscreen_requested
,
.
maximized_requested
=
desktop_surface_maximized_requested
,
.
minimized_requested
=
desktop_surface_minimized_requested
,
.
set_xwayland_position
=
desktop_surface_set_xwayland_position
,
};
/*
* end of libweston-desktop
*/
/*
* Initialization of ivi-shell.
*/
...
...
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