Je cherche un moyen d'obtenir (et définir) le fond d'écran dans l'objectif c sous Mac OS X.Comment obtenir et définir le papier peint dans l'objectif c sur Mac OSX?
Avez-vous du code/pointeur pour cela?
Merci d'avance pour votre aide.
Je cherche un moyen d'obtenir (et définir) le fond d'écran dans l'objectif c sous Mac OS X.Comment obtenir et définir le papier peint dans l'objectif c sur Mac OSX?
Avez-vous du code/pointeur pour cela?
Merci d'avance pour votre aide.
Pour OSX> = 10,6 NSWorkSpace
utilisation:
Pour une solution à base de CFPreferences
voir par exemple le topdraw sources:
CFStringRef appID = CFSTR("com.apple.desktop");
CFStringRef bkg = CFSTR("Background");
// get:
NSDictionary *origBackgroundDict = (NSDictionary)CFPreferencesCopyAppValue(bkg, appID);
// ...
// set and notify dock:
CFPreferencesSetAppValue(bkg, (CFPropertyListRef)backgroundDict, appID);
CFPreferencesAppSynchronize(appID);
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:@"com.apple.desktop" object:@"BackgroundChanged"];
comment créer live wallpaper –
"Teh papier peint" est appelé l'image de bureau sous Mac OS X. –
Il est triste que Apple utilise lui-même "fond d'écran" sur iPad/iPhone ... – Yuji