1/**
2 * Copyright (c) 2008, The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.app;
18
19import android.graphics.Rect;
20import android.os.Bundle;
21import android.os.ParcelFileDescriptor;
22import android.app.IWallpaperManagerCallback;
23import android.app.WallpaperInfo;
24import android.content.ComponentName;
25
26/** @hide */
27interface IWallpaperManager {
28
29    /**
30     * Set the wallpaper.
31     */
32    ParcelFileDescriptor setWallpaper(String name);
33
34    /**
35     * Set the live wallpaper.
36     */
37    void setWallpaperComponent(in ComponentName name);
38
39    /**
40     * Get the wallpaper.
41     */
42    ParcelFileDescriptor getWallpaper(IWallpaperManagerCallback cb,
43            out Bundle outParams);
44
45    /**
46     * Get information about a live wallpaper.
47     */
48    WallpaperInfo getWallpaperInfo();
49
50    /**
51     * Clear the wallpaper.
52     */
53    void clearWallpaper();
54
55    /**
56     * Return whether there is a wallpaper set with the given name.
57     */
58    boolean hasNamedWallpaper(String name);
59
60    /**
61     * Sets the dimension hint for the wallpaper. These hints indicate the desired
62     * minimum width and height for the wallpaper.
63     */
64    void setDimensionHints(in int width, in int height);
65
66    /**
67     * Returns the desired minimum width for the wallpaper.
68     */
69    int getWidthHint();
70
71    /**
72     * Returns the desired minimum height for the wallpaper.
73     */
74    int getHeightHint();
75
76    /**
77     * Sets extra padding that we would like the wallpaper to have outside of the display.
78     */
79    void setDisplayPadding(in Rect padding);
80
81    /**
82     * Returns the name of the wallpaper. Private API.
83     */
84    String getName();
85
86    /**
87     * Informs the service that wallpaper settings have been restored. Private API.
88     */
89    void settingsRestored();
90}
91