Mercurial > pidgin.yaz
comparison src/gtkutils.h @ 13090:0aa231ebbfd5
[gaim-migrate @ 15452]
Changes to some pixbuf stuff.
I added a 'gaim_gtk_create_gaim_icon_with_status()' function to util.c,
and changed 'gaim_gtk_create_prpl_icon_with_status()' to accept a scale
factor because almost everywhere this function was used we would scale
the pixbuf to a smaller size as soon as we got it. So there's a bit less
code duplication.
Also, I think I added some g_object_unref()'s in one or two places where
it was missing.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 01 Feb 2006 22:38:34 +0000 |
parents | 248b8b39c671 |
children | 079f7a452e3a |
comparison
equal
deleted
inserted
replaced
13089:b553326bc468 | 13090:0aa231ebbfd5 |
---|---|
353 | 353 |
354 /** | 354 /** |
355 * Returns the base image to represent the account, based on | 355 * Returns the base image to represent the account, based on |
356 * the currently selected theme. | 356 * the currently selected theme. |
357 * | 357 * |
358 * @param account The account. | 358 * @param account The account. |
359 * | 359 * @param scale_factor The amount to scale to the original image. |
360 * @return The icon. | 360 * The default size is 30x30 pixels. A scale |
361 */ | 361 * factor of 1 means no scaling will be done. |
362 GdkPixbuf *gaim_gtk_create_prpl_icon(GaimAccount *account); | 362 * A scale factor of 0.5 means the length |
363 | 363 * and width will be 15 pixels each. |
364 /** | 364 * |
365 * Create a protocol-icon with the status emblem. | 365 * @return A newly-created pixbuf with a reference count of 1, |
366 * | 366 * or NULL if any of several error conditions occurred: |
367 * @param account The account. | 367 * the file could not be opened, there was no loader |
368 * @param status_type The status type to set the emblem for. | 368 * for the file's format, there was not enough memory |
369 * | 369 * to allocate the image buffer, or the image file |
370 * @return The icon. | 370 * contained invalid data. |
371 */ | 371 */ |
372 GdkPixbuf * gaim_gtk_create_prpl_icon_with_status(GaimAccount *account, GaimStatusType *status_type); | 372 GdkPixbuf *gaim_gtk_create_prpl_icon(GaimAccount *account, double scale_factor); |
373 | |
374 /** | |
375 * Create a protocol icon with the status emblem overlayed in | |
376 * the lower right corner. | |
377 * | |
378 * @param account The account. | |
379 * @param status_type The status type of the emblem to overlay. | |
380 * @param scale_factor The amount to scale to the original image. | |
381 * The default size is 30x30 pixels. A scale | |
382 * factor of 1 means no scaling will be done. | |
383 * A scale factor of 0.5 means the length | |
384 * and width will be 15 pixels each. | |
385 * | |
386 * @return A newly-created pixbuf with a reference count of 1, | |
387 * or NULL if any of several error conditions occurred: | |
388 * the file could not be opened, there was no loader | |
389 * for the file's format, there was not enough memory | |
390 * to allocate the image buffer, or the image file | |
391 * contained invalid data. | |
392 */ | |
393 GdkPixbuf *gaim_gtk_create_prpl_icon_with_status(GaimAccount *account, GaimStatusType *status_type, double scale_factor); | |
394 | |
395 /** | |
396 * Create a Gaim running-man icon with the status emblem overlayed | |
397 * in the lower right corner. | |
398 * | |
399 * @param status_type The status type to set the emblem for. | |
400 * @param scale_factor The amount to scale to the original image. | |
401 * The default size is 30x30 pixels. A scale | |
402 * factor of 1 means no scaling will be done. | |
403 * A scale factor of 0.5 means the length | |
404 * and width will be 15 pixels each. | |
405 * | |
406 * @return A newly-created pixbuf with a reference count of 1, | |
407 * or NULL if any of several error conditions occurred: | |
408 * the file could not be opened, there was no loader for | |
409 * the file's format, there was not enough memory to | |
410 * allocate the image buffer, or the image file contained | |
411 * invalid data. | |
412 */ | |
413 GdkPixbuf *gaim_gtk_create_gaim_icon_with_status(GaimStatusPrimitive primitve, double scale_factor); | |
414 | |
373 | 415 |
374 /** | 416 /** |
375 * Append a GaimMenuAction to a menu. | 417 * Append a GaimMenuAction to a menu. |
376 * | 418 * |
377 * @param menu The menu to append to. | 419 * @param menu The menu to append to. |