// Type definitions for jQuery prettyPhoto 3.1.5 // Project: https://github.com/scaron/prettyphoto // Definitions by: pgaske // Definitions: https://github.com/borisyankov/DefinitelyTyped /// declare module scaron_prettyPhoto { /** * Pretty photo settings */ interface PrettyPhotoSettings { /** * the attribute tag to use for prettyPhoto hooks. For HTML5, use "data-rel" or similar. * @default 'rel' */ hook?: string; /** * fast/slow/normal * @default 'fast' */ animation_speed?: string; ajaxcallback?: () => void; /** * false OR interval time in ms * @default 5000 */ slideshow?: any; /** * true/false * @default false */ autoplay_slideshow?: boolean; /** * Value between 0 and 1 * @default 0.80 */ opacity?: number; /** * true/false * @default true */ show_title?: boolean; /** * Resize the photos bigger than viewport. true/false * @default true */ allow_resize?: boolean; /** * Allow the user to expand a resized image. true/false * @default true */ allow_expand?: boolean; /** * Pixels * @default 500 */ default_width?: number; /** * Pixels * @default 344 */ default_height?: number; /** * The separator for the gallery counter 1 "of" 2 * @default '/' */ counter_separator_label?: string; /** * light_rounded / dark_rounded / light_square / dark_square / facebook * @default 'pp_default' */ theme?: string; /** * The padding on each side of the picture * @default 20 */ horizontal_padding?: number; /** * Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto * @default false */ hideflash?: boolean; /** * Set the flash wmode attribute * @default 'opaque' */ wmode?: string; /** * Automatically start videos: True/False * @default true */ autoplay?: boolean; /** * If set to true, only the close button will close the window * @default false */ modal?: boolean; /** * Allow prettyPhoto to update the url to enable deeplinking. * @default true */ deeplinking?: boolean; /** * If set to true, a gallery will overlay the fullscreen image on mouse over * @default true */ overlay_gallery?: boolean; /** * Maximum number of pictures in the overlay gallery * @default 30 */ overlay_gallery_max?: number; /** * Set to false if you open forms inside prettyPhoto * @default true */ keyboard_shortcuts?: boolean; /** * Called everytime an item is shown/changed * @default function () { } */ changepicturecallback?: () => void; /** * Called when prettyPhoto is closed * @default function () { } */ callback?: () => void; /** * @default true */ ie6_fallback?: boolean; /** * Markup for pretty photo * @default omitted for brevity */ markup?: string; /** * Markup for pretty photo gallery * @default omitted for brevity */ gallery_markup?: string; /** * Markup for image * @default '' */ image_markup?: string; /** * Markup for flash * @default '' */ flash_markup?: string; /** * Markup for quicktime * @default '' */ quicktime_markup?: string; /** * Markup for iframe * @default '' */ iframe_markup?: string; /** * @default '
{content}
' */ inline_markup?: string; /** * @default '' */ custom_markup?: string; /** * Markup for social tools, set to html or false to disable * @default '' */ social_tools?: any; } interface moduleJQuery { /** * Initialises prettyPhoto */ (): JQuery; /** * Initialises prettyPhoto specificying overrides for the defaults * @param pp_settings custom prettyPhoto settings */ (pp_settings: PrettyPhotoSettings): JQuery; } interface moduleJQueryStatic { /** * prettyPhoto version number */ version: string; /** * Opens the prettyPhoto modal box. * Note: Always returns false. */ open(): boolean; /** * Opens the prettyPhoto modal box. * Note: Always returns false. * @param image {String} Full path to the image to be open, can also be an array containing full images paths. * @param title {String} The title to be displayed with the picture, can also be an array containing all the titles. * @param description {String} The description to be displayed with the picture, can also be an array containing all the descriptions. */ open(image: string, title: string, description: string): boolean; /** * Opens the prettyPhoto modal box. * Note: Always returns false. * @param image {Array} Full path to the image to be open, can also be an array containing full images paths. * @param title {Array} The title to be displayed with the picture, can also be an array containing all the titles. * @param description {Array} The description to be displayed with the picture, can also be an array containing all the descriptions. */ open(images: string[], titles: string[], descriptions: string[]): boolean; /** * Change page in the prettyPhoto modal box * @param direction {String} Direction of the paging, previous or next. */ changePage(direction: string): void; /** * Change gallery page in the prettyPhoto modal box * @param direction {String} Direction of the paging, previous or next. */ changeGalleryPage(direction: string): void; /** * Start the slideshow... */ startSlideshow(): void; /** * Stop the slideshow... */ stopSlideshow(): void; /** * Closes prettyPhoto. */ close(): void; } } interface JQuery { prettyPhoto: scaron_prettyPhoto.moduleJQuery; } interface JQueryStatic { prettyPhoto: scaron_prettyPhoto.moduleJQueryStatic; }