1 2@c %start of fragment 3 4@deftp Class <gtk-recent-chooser> 5Derives from @code{<ginterface>}. 6 7This class defines the following slots: 8 9@table @code 10@item recent-manager 11The RecentManager object to use 12 13@item show-private 14Whether the private items should be displayed 15 16@item show-not-found 17Whether the items pointing to unavailable resources should be displayed 18 19@item show-tips 20Whether there should be a tooltip on the item 21 22@item show-icons 23Whether there should be an icon near the item 24 25@item sort-type 26The sorting order of the items displayed 27 28@item select-multiple 29Whether to allow multiple items to be selected 30 31@item filter 32The current filter for selecting which resources are displayed 33 34@item limit 35The maximum number of items to be displayed 36 37@item local-only 38Whether the selected resource(s) should be limited to local file: URIs 39 40@end table 41 42@end deftp 43 44@defop Signal <gtk-recent-chooser> selection-changed 45This signal is emitted when there is a change in the set of selected recently 46used resources. This can happen when a user modifies the selection with the 47mouse or the keyboard, or when explicitely calling functions to change the 48selection. 49 50Since 2.10 51 52@end defop 53 54@defop Signal <gtk-recent-chooser> item-activated 55This signal is emitted when the user "activates" a recent item in the recent 56chooser. This can happen by double-clicking on an item in the recently used 57resources list, or by pressing @c (keycap "Enter") . 58 59Since 2.10 60 61@end defop 62 63@deffn Function gtk-recent-chooser-set-show-private (self@tie{}@code{<gtk-recent-chooser>}) (show_private@tie{}@code{bool}) 64@deffnx Method set-show-private 65Whether to show recently used resources marked registered as private. 66 67@table @var 68@item chooser 69a @code{<gtk-recent-chooser>} 70 71@item show-private 72@samp{@code{#t}} to show private items, @samp{@code{#f}} otherwise 73 74@end table 75 76Since 2.10 77 78@end deffn 79 80@deffn Function gtk-recent-chooser-get-show-private (self@tie{}@code{<gtk-recent-chooser>}) @result{}@tie{} (ret@tie{}@code{bool}) 81@deffnx Method get-show-private 82Returns whether @var{chooser} should display recently used resources registered 83as private. 84 85@table @var 86@item chooser 87a @code{<gtk-recent-chooser>} 88 89@item ret 90@samp{@code{#t}} if the recent chooser should show private items, 91@samp{@code{#f}} otherwise. 92 93@end table 94 95Since 2.10 96 97@end deffn 98 99@deffn Function gtk-recent-chooser-set-show-icons (self@tie{}@code{<gtk-recent-chooser>}) (show_icons@tie{}@code{bool}) 100@deffnx Method set-show-icons 101Sets whether @var{chooser} should show an icon near the resource when displaying 102it. 103 104@table @var 105@item chooser 106a @code{<gtk-recent-chooser>} 107 108@item show-icons 109whether to show an icon near the resource 110 111@end table 112 113Since 2.10 114 115@end deffn 116 117@deffn Function gtk-recent-chooser-get-show-icons (self@tie{}@code{<gtk-recent-chooser>}) @result{}@tie{} (ret@tie{}@code{bool}) 118@deffnx Method get-show-icons 119Retrieves whether @var{chooser} should show an icon near the resource. 120 121@table @var 122@item chooser 123a @code{<gtk-recent-chooser>} 124 125@item ret 126@samp{@code{#t}} if the icons should be displayed, @samp{@code{#f}} otherwise. 127 128@end table 129 130Since 2.10 131 132@end deffn 133 134@deffn Function gtk-recent-chooser-set-local-only (self@tie{}@code{<gtk-recent-chooser>}) (local_only@tie{}@code{bool}) 135@deffnx Method set-local-only 136Sets whether only local resources, that is resources using the file:// URI 137scheme, should be shown in the recently used resources selector. If 138@var{local-only} is @samp{@code{#t}} (the default) then the shown resources are 139guaranteed to be accessible through the operating system native file system. 140 141@table @var 142@item chooser 143a @code{<gtk-recent-chooser>} 144 145@item local-only 146@samp{@code{#t}} if only local files can be shown 147 148@end table 149 150Since 2.10 151 152@end deffn 153 154@deffn Function gtk-recent-chooser-get-local-only (self@tie{}@code{<gtk-recent-chooser>}) @result{}@tie{} (ret@tie{}@code{bool}) 155@deffnx Method get-local-only 156Gets whether only local resources should be shown in the recently used resources 157selector. See @code{gtk-recent-chooser-set-local-only} 158 159@table @var 160@item chooser 161a @code{<gtk-recent-chooser>} 162 163@item ret 164@samp{@code{#t}} if only local resources should be shown. 165 166@end table 167 168Since 2.10 169 170@end deffn 171 172@deffn Function gtk-recent-chooser-set-limit (self@tie{}@code{<gtk-recent-chooser>}) (limit@tie{}@code{int}) 173@deffnx Method set-limit 174Sets the number of items that should be returned by 175@code{gtk-recent-chooser-get-items} and @code{gtk-recent-chooser-get-uris}. 176 177@table @var 178@item chooser 179a @code{<gtk-recent-chooser>} 180 181@item limit 182a positive integer, or -1 for all items 183 184@end table 185 186Since 2.10 187 188@end deffn 189 190@deffn Function gtk-recent-chooser-get-limit (self@tie{}@code{<gtk-recent-chooser>}) @result{}@tie{} (ret@tie{}@code{int}) 191@deffnx Method get-limit 192Gets the number of items returned by @code{gtk-recent-chooser-get-items} and 193@code{gtk-recent-chooser-get-uris}. 194 195@table @var 196@item chooser 197a @code{<gtk-recent-chooser>} 198 199@item ret 200A positive integer, or -1 meaning that all items are returned. 201 202@end table 203 204Since 2.10 205 206@end deffn 207 208@deffn Function gtk-recent-chooser-set-show-tips (self@tie{}@code{<gtk-recent-chooser>}) (show_tips@tie{}@code{bool}) 209@deffnx Method set-show-tips 210Sets whether to show a tooltips on the widget. 211 212@table @var 213@item chooser 214a @code{<gtk-recent-chooser>} 215 216@item show-tips 217@samp{@code{#t}} if tooltips should be shown 218 219@end table 220 221Since 2.10 222 223@end deffn 224 225@deffn Function gtk-recent-chooser-get-show-tips (self@tie{}@code{<gtk-recent-chooser>}) @result{}@tie{} (ret@tie{}@code{bool}) 226@deffnx Method get-show-tips 227Gets whether @var{chooser} should display tooltips. 228 229@table @var 230@item chooser 231a @code{<gtk-recent-chooser>} 232 233@item ret 234@samp{@code{#t}} if the recent chooser should show tooltips, @samp{@code{#f}} 235otherwise. 236 237@end table 238 239Since 2.10 240 241@end deffn 242 243@deffn Function gtk-recent-chooser-set-show-numbers (self@tie{}@code{<gtk-recent-chooser>}) (show_numbers@tie{}@code{bool}) 244@deffnx Method set-show-numbers 245Whether to show recently used resources prepended by a unique number. 246 247Do not use this function: use @code{gtk-recent-chooser-menu-set-show-numbers} 248instead. 249 250@table @var 251@item chooser 252a @code{<gtk-recent-chooser>} 253 254@item show-numbers 255@samp{@code{#t}} to show numbers, @samp{@code{#f}} otherwise 256 257@end table 258 259Since 2.10 260 261@end deffn 262 263@deffn Function gtk-recent-chooser-get-show-numbers (self@tie{}@code{<gtk-recent-chooser>}) @result{}@tie{} (ret@tie{}@code{bool}) 264@deffnx Method get-show-numbers 265Returns whether @var{chooser} should display recently used resources prepended 266by a unique number. 267 268Do not use this function: use @code{gtk-recent-chooser-menu-get-show-numbers} 269instead. 270 271@table @var 272@item chooser 273a @code{<gtk-recent-chooser>} 274 275@item ret 276@samp{@code{#t}} if the recent chooser should show display numbers, 277@samp{@code{#f}} otherwise. 278 279@end table 280 281Since 2.10 282 283@end deffn 284 285@deffn Function gtk-recent-chooser-set-sort-type (self@tie{}@code{<gtk-recent-chooser>}) (sort_type@tie{}@code{<gtk-recent-sort-type>}) 286@deffnx Method set-sort-type 287Changes the sorting order of the recently used resources list displayed by 288@var{chooser}. 289 290@table @var 291@item chooser 292a @code{<gtk-recent-chooser>} 293 294@item sort-type 295sort order that the chooser should use 296 297@end table 298 299Since 2.10 300 301@end deffn 302 303@deffn Function gtk-recent-chooser-get-sort-type (self@tie{}@code{<gtk-recent-chooser>}) @result{}@tie{} (ret@tie{}@code{<gtk-recent-sort-type>}) 304@deffnx Method get-sort-type 305Gets the value set by @code{gtk-recent-chooser-set-sort-type}. 306 307@table @var 308@item chooser 309a @code{<gtk-recent-chooser>} 310 311@item ret 312the sorting order of the @var{chooser}. 313 314@end table 315 316Since 2.10 317 318@end deffn 319 320@deffn Function gtk-recent-chooser-set-current-uri (self@tie{}@code{<gtk-recent-chooser>}) (uri@tie{}@code{mchars}) @result{}@tie{} (ret@tie{}@code{bool}) 321@deffnx Method set-current-uri 322Sets @var{uri} as the current URI for @var{chooser}. 323 324@table @var 325@item chooser 326a @code{<gtk-recent-chooser>} 327 328@item uri 329a URI 330 331@item error 332return location for a @code{<g-error>}, or @samp{@code{#f}} 333 334@item ret 335@samp{@code{#t}} if the URI was found. 336 337@end table 338 339Since 2.10 340 341@end deffn 342 343@deffn Function gtk-recent-chooser-get-current-uri (self@tie{}@code{<gtk-recent-chooser>}) @result{}@tie{} (ret@tie{}@code{mchars}) 344@deffnx Method get-current-uri 345Gets the URI currently selected by @var{chooser}. 346 347@table @var 348@item chooser 349a @code{<gtk-recent-chooser>} 350 351@item ret 352a newly allocated string holding a URI. 353 354@end table 355 356Since 2.10 357 358@end deffn 359 360@deffn Function gtk-recent-chooser-get-current-item (self@tie{}@code{<gtk-recent-chooser>}) @result{}@tie{} (ret@tie{}@code{<gtk-recent-info>}) 361@deffnx Method get-current-item 362Gets the @code{<gtk-recent-info>} currently selected by @var{chooser}. 363 364@table @var 365@item chooser 366a @code{<gtk-recent-chooser>} 367 368@item ret 369a @code{<gtk-recent-info>}. Use @code{gtk-recent-info-unref} when when you have 370finished using it. 371 372@end table 373 374Since 2.10 375 376@end deffn 377 378@deffn Function gtk-recent-chooser-select-uri (self@tie{}@code{<gtk-recent-chooser>}) (uri@tie{}@code{mchars}) @result{}@tie{} (ret@tie{}@code{bool}) 379@deffnx Method select-uri 380Selects @var{uri} inside @var{chooser}. 381 382@table @var 383@item chooser 384a @code{<gtk-recent-chooser>} 385 386@item uri 387a URI 388 389@item error 390return location for a @code{<g-error>}, or @samp{@code{#f}} 391 392@item ret 393@samp{@code{#t}} if @var{uri} was found. 394 395@end table 396 397Since 2.10 398 399@end deffn 400 401@deffn Function gtk-recent-chooser-unselect-uri (self@tie{}@code{<gtk-recent-chooser>}) (uri@tie{}@code{mchars}) 402@deffnx Method unselect-uri 403Unselects @var{uri} inside @var{chooser}. 404 405@table @var 406@item chooser 407a @code{<gtk-recent-chooser>} 408 409@item uri 410a URI 411 412@end table 413 414Since 2.10 415 416@end deffn 417 418@deffn Function gtk-recent-chooser-select-all (self@tie{}@code{<gtk-recent-chooser>}) 419@deffnx Method select-all 420Selects all the items inside @var{chooser}, if the @var{chooser} supports 421multiple selection. 422 423@table @var 424@item chooser 425a @code{<gtk-recent-chooser>} 426 427@end table 428 429Since 2.10 430 431@end deffn 432 433@deffn Function gtk-recent-chooser-unselect-all (self@tie{}@code{<gtk-recent-chooser>}) 434@deffnx Method unselect-all 435Unselects all the items inside @var{chooser}. 436 437@table @var 438@item chooser 439a @code{<gtk-recent-chooser>} 440 441@end table 442 443Since 2.10 444 445@end deffn 446 447@deffn Function gtk-recent-chooser-get-items (self@tie{}@code{<gtk-recent-chooser>}) @result{}@tie{} (ret@tie{}@code{glist-of}) 448@deffnx Method get-items 449Gets the list of recently used resources in form of @code{<gtk-recent-info>} 450objects. 451 452The return value of this function is affected by the "sort-type" and "limit" 453properties of @var{chooser}. 454 455@table @var 456@item chooser 457a @code{<gtk-recent-chooser>} 458 459@item ret 460A newly allocated list of @code{<gtk-recent-info>} objects. You should use 461@code{gtk-recent-info-unref} on every item of the list, and then free the list 462itself using @code{g-list-free}. 463 464@end table 465 466Since 2.10 467 468@end deffn 469 470@deffn Function gtk-recent-chooser-add-filter (self@tie{}@code{<gtk-recent-chooser>}) (filter@tie{}@code{<gtk-recent-filter>}) 471@deffnx Method add-filter 472Adds @var{filter} to the list of @code{<gtk-recent-filter>} objects held by 473@var{chooser}. 474 475If no previous filter objects were defined, this function will call 476@code{gtk-recent-chooser-set-filter}. 477 478@table @var 479@item chooser 480a @code{<gtk-recent-chooser>} 481 482@item filter 483a @code{<gtk-recent-filter>} 484 485@end table 486 487Since 2.10 488 489@end deffn 490 491@deffn Function gtk-recent-chooser-remove-filter (self@tie{}@code{<gtk-recent-chooser>}) (filter@tie{}@code{<gtk-recent-filter>}) 492@deffnx Method remove-filter 493Removes @var{filter} from the list of @code{<gtk-recent-filter>} objects held by 494@var{chooser}. 495 496@table @var 497@item chooser 498a @code{<gtk-recent-chooser>} 499 500@item filter 501a @code{<gtk-recent-filter>} 502 503@end table 504 505Since 2.10 506 507@end deffn 508 509@deffn Function gtk-recent-chooser-list-filters (self@tie{}@code{<gtk-recent-chooser>}) @result{}@tie{} (ret@tie{}@code{gslist-of}) 510@deffnx Method list-filters 511Gets the @code{<gtk-recent-filter>} objects held by @var{chooser}. 512 513@table @var 514@item chooser 515a @code{<gtk-recent-chooser>} 516 517@item ret 518A singly linked list of @code{<gtk-recent-filter>} objects. You should just free 519the returned list using @code{g-slist-free}. 520 521@end table 522 523Since 2.10 524 525@end deffn 526 527@deffn Function gtk-recent-chooser-set-filter (self@tie{}@code{<gtk-recent-chooser>}) (filter@tie{}@code{<gtk-recent-filter>}) 528@deffnx Method set-filter 529Sets @var{filter} as the current @code{<gtk-recent-filter>} object used by 530@var{chooser} to affect the displayed recently used resources. 531 532@table @var 533@item chooser 534a @code{<gtk-recent-chooser>} 535 536@item filter 537a @code{<gtk-recent-filter>} 538 539@end table 540 541Since 2.10 542 543@end deffn 544 545@deffn Function gtk-recent-chooser-get-filter (self@tie{}@code{<gtk-recent-chooser>}) @result{}@tie{} (ret@tie{}@code{<gtk-recent-filter>}) 546@deffnx Method get-filter 547Gets the @code{<gtk-recent-filter>} object currently used by @var{chooser} to 548affect the display of the recently used resources. 549 550@table @var 551@item chooser 552a @code{<gtk-recent-chooser>} 553 554@item ret 555a @code{<gtk-recent-filter>} object. 556 557@end table 558 559Since 2.10 560 561@end deffn 562 563 564@c %end of fragment 565