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 17 package android.app; 18 19 import android.graphics.Rect; 20 import android.os.Bundle; 21 import android.os.ParcelFileDescriptor; 22 import android.app.IWallpaperManagerCallback; 23 import android.app.WallpaperInfo; 24 import android.content.ComponentName; 25 26 /** @hide */ 27 interface IWallpaperManager { 28 29 /** 30 * Set the wallpaper. 31 */ setWallpaper(String name)32 ParcelFileDescriptor setWallpaper(String name); 33 34 /** 35 * Set the live wallpaper. 36 */ setWallpaperComponent(in ComponentName name)37 void setWallpaperComponent(in ComponentName name); 38 39 /** 40 * Get the wallpaper. 41 */ getWallpaper(IWallpaperManagerCallback cb, out Bundle outParams)42 ParcelFileDescriptor getWallpaper(IWallpaperManagerCallback cb, 43 out Bundle outParams); 44 45 /** 46 * Get information about a live wallpaper. 47 */ getWallpaperInfo()48 WallpaperInfo getWallpaperInfo(); 49 50 /** 51 * Clear the wallpaper. 52 */ clearWallpaper()53 void clearWallpaper(); 54 55 /** 56 * Return whether there is a wallpaper set with the given name. 57 */ hasNamedWallpaper(String name)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 */ setDimensionHints(in int width, in int height)64 void setDimensionHints(in int width, in int height); 65 66 /** 67 * Returns the desired minimum width for the wallpaper. 68 */ getWidthHint()69 int getWidthHint(); 70 71 /** 72 * Returns the desired minimum height for the wallpaper. 73 */ getHeightHint()74 int getHeightHint(); 75 76 /** 77 * Sets extra padding that we would like the wallpaper to have outside of the display. 78 */ setDisplayPadding(in Rect padding)79 void setDisplayPadding(in Rect padding); 80 81 /** 82 * Returns the name of the wallpaper. Private API. 83 */ getName()84 String getName(); 85 86 /** 87 * Informs the service that wallpaper settings have been restored. Private API. 88 */ settingsRestored()89 void settingsRestored(); 90 } 91