Handlers

Functions that enable widgets to “act”.

General handlers

ClutterScript signal handler library. See also :module:`pisak.signals`.

pisak.handlers.button_to_view(window, script, button_name, view_to_load=None, data=None)[source]

Function connecting the given button to a callback loading the given view.

Parameters:
  • stage – ClutterStage instance being the ancestor of the given button.
  • script – ClutterScript to get the button from.
  • button_name – name of the given button.
  • view_to_load – name of the view to be loaded.
  • data – optional data.
pisak.handlers.connect_button(script, button_name, handler, *args)[source]

Function connecting the given button to a callback using the defalt signal.

Parameters:
  • script – ClutterScript to get the button from.
  • button_name – name of the given button.
  • handler – callable handler.
  • args – optional arguments to be passed to handler.
pisak.handlers.decrease_volume(player)[source]

Decrease volume of the media playback.

Parameters:player – media player instance.
pisak.handlers.exit_app(source)[source]

Destroy stage of the given element.

Parameters:source – element whose stage should be destroyed.
pisak.handlers.increase_volume(player)[source]

Increase volume of the media playback.

Parameters:player – media player instance.
pisak.handlers.kill_group(source)[source]

Stop scanning group, fatally.

Parameters:source – signal source.
pisak.handlers.move_next(playlist)[source]

Move to the next position on the given playlist.

Parameters:playlist – PisakPlaylist instance.
pisak.handlers.move_previous(playlist)[source]

Move to the previous position on the given playlist.

Parameters:playlist – PisakPlaylist instance.
pisak.handlers.next_data_set(data_source)[source]

Make the given data source to move to the next data set.

Parameters:data_source – data source.
pisak.handlers.next_page(pager)[source]

Move to the next page of the given pager.

Parameters:pager – pisak pager instance.
pisak.handlers.pause(playlist)[source]

Pause playing the current media item on the given playlist.

Parameters:playlist – PisakPlaylist instance.
pisak.handlers.pause_media(player)[source]

Pause playing the media playback.

Parameters:player – media player instance.
pisak.handlers.play(playlist)[source]

Start playing the current media item on the given playlist.

Parameters:playlist – PisakPlaylist instance.
pisak.handlers.play_media(player)[source]

Start playing the media playback.

Parameters:player – media player instance.
pisak.handlers.previous_data_set(data_source)[source]

Make the given data source to move to the previous data set.

Parameters:data_source – data source.
pisak.handlers.previous_page(pager)[source]

Move to the previous page of the given pager.

Parameters:pager – pisak pager instance.
pisak.handlers.run_input_middleware(source)[source]

Run the current middleware.

Parameters:source – signal source.
pisak.handlers.scan_page(pager)[source]

Start scanning the current page of the given pager.

Parameters:pager – pisak pager instance.
pisak.handlers.set_pending_group(group)[source]

Set the given group strategy’s unwind to as the group’s parent group. Set the given group as a pending group of its window.

Parameters:group – pisak scanning group instance.
pisak.handlers.set_unworking(button)[source]

Turn off the working state of the given button.

Parameters:button – pisak button instance.
pisak.handlers.set_working(button)[source]

Turn on the working state of the given button.

Parameters:button – pisak button instance.
pisak.handlers.skip_backward(player)[source]

Skip the media playback backward.

Parameters:player – media player instance.
pisak.handlers.skip_forward(player)[source]

Skip the media playback forward.

Parameters:player – media player instance.
pisak.handlers.start_group(source)[source]

Start scanning group.

Parameters:source – signal source.
pisak.handlers.stop(playlist)[source]

Stop playing of the given playlist.

Parameters:playlist – PisakPlaylist instance.
pisak.handlers.stop_input_middleware(source)[source]

Stop the middleware. Useful if the middleware is planned to be restarted.

Parameters:source – signal source.
pisak.handlers.stop_media(player)[source]

Stop playing the media playback.

Parameters:player – media player instance.
pisak.handlers.switch_icon(button)[source]

Switch icon on the given button.

Parameters:button – pisak button instance.
pisak.handlers.switch_label(button)[source]

Switch label on the given button.

Parameters:button – pisak button instance.
pisak.handlers.toggle(button)[source]

Turn on the toggled state of the given button.

Parameters:button – pisak button instance.
pisak.handlers.toggle_automatic(pager)[source]

Turn on or turn off the automatic mode of pages flipping.

Parameters:pager – pisak pager instance.
pisak.handlers.toggle_looped(playlist)[source]

Turn on or turn off the looped mode of the given playlist.

Parameters:playlist – PisakPlaylist instance.
pisak.handlers.toggle_pause_group(source)[source]

Pause or restart to scan group.

Parameters:source – signal source.
pisak.handlers.toggle_play(playlist)[source]

Start or pause playing the current media item on the given playlist, basing on the current item state.

Parameters:playlist – PisakPlaylist instance.
pisak.handlers.toggle_play_media(player)[source]

Start or pause playing the current media stream, basing on the current state.

Parameters:player – PisakMediaPlayback instance.
pisak.handlers.toggle_random_order(playlist)[source]

Turn on or turn off the random order of playing the items on the given playlist.

Parameters:playlist – PisakPlaylist instance.
pisak.handlers.toggle_rewind_backward(player)[source]

Start or stop rewinding of the media playback backward.

Parameters:player – media player instance.
pisak.handlers.toggle_rewind_forward(player)[source]

Start or stop rewinding of the media playback forward.

Parameters:player – media player instance.
pisak.handlers.toggle_toggle(button)[source]

Turn on or off the toggled state of the given button.

Parameters:button – pisak button instance.
pisak.handlers.toggle_working(button)[source]

Turn on or turn off the working state of the given button.

Parameters:button – pisak button instance.
pisak.handlers.unpause_group(source)[source]

Unpause the scanning of a group.

Parameters:source – signal source.
pisak.handlers.untoggle(button)[source]

Turn off the toggled state of the given button.

Parameters:button – pisak button instance.

Audio handlers

pisak.audio.handlers.add_or_remove_from_favs(playback)[source]

Add or remove the current audio stream object from the favourites.

Parameters:playback – media playback with audio to be marked as favourite

Movie handlers

Paint handlers

Speller handlers

Symboler handlers

Signal handlers specific for the symboler application.

pisak.symboler.handlers.backspace(entry)[source]

Delete the last symbol from the entry.

Parameters:entry – symbols entry.
pisak.symboler.handlers.clear_all(entry)[source]

Clear the whole entry.

Parameters:entry – symbols entry.
pisak.symboler.handlers.load(pop_up)[source]

Load one of the previously saved symbols chains. Put the symbols inside the entry. Open a dialog window.

Parameters:pop_up – dialog window.
pisak.symboler.handlers.load_main(data_source)[source]

Load main content of the symboler, that is table of contents and then all the categories.

Parameters:data_source – source of the data for the pager.
pisak.symboler.handlers.save(pop_up)[source]

Save the current symbols buffer. Open a dialog window.

Parameters:pop_up – dialog window.
pisak.symboler.handlers.scroll_left(entry)[source]

Scroll the entry content left.

Parameters:entry – symbols entry.
pisak.symboler.handlers.scroll_right(entry)[source]

Scroll the entry content right.

Parameters:entry – symbols entry.
pisak.symboler.handlers.text_to_speech(entry)[source]

Read the text loud.

Parameters:entry – symbols entry.

Viewer handlers

Signal handlers specific for the viewer application.

pisak.viewer.handlers.add_or_remove_from_favs(slideshow_widget)[source]

Add or remove the currently displayed photo from the favourites.

Parameters:slideshow_widget – pisak slideshow instance.
pisak.viewer.handlers.add_photo_to_favourites(slideshow_widget)[source]

Add the currently displayed photo to the favourites.

Parameters:slideshow_widget – pisak slideshow instance.
pisak.viewer.handlers.contour(slide_space)[source]

Apply a contour effect to the photo.

Parameters:slide_space – container with the pisak slide instance inside.
pisak.viewer.handlers.edges(slide_space)[source]

Apply a edges effect to the photo.

Parameters:slide_space – container with the pisak slide instance inside.
pisak.viewer.handlers.grayscale(slide_space)[source]

Apply a grayscale effect to the photo.

Parameters:slide_space – container with the pisak slide instance inside.
pisak.viewer.handlers.invert(slide_space)[source]

Apply a color invert effect to the photo.

Parameters:slide_space – container with the pisak slide instance inside.
pisak.viewer.handlers.mirror(slide_space)[source]

Apply a mirror effect to the photo.

Parameters:slide_space – container with the pisak slide instance inside.
pisak.viewer.handlers.next_slide(slideshow_widget)[source]

Move to the next slide.

Parameters:slideshow_widget – pisak slideshow instance.
pisak.viewer.handlers.noise(slide_space)[source]

Apply a noise effect to the photo.

Parameters:slide_space – container with the pisak slide instance inside.
pisak.viewer.handlers.original(slide_space)[source]

Remove all the applied effects an operations and go back to the original photo.

Parameters:slide_space – container with the pisak slide instance inside.
pisak.viewer.handlers.previous_slide(slideshow_widget)[source]

Move to the previous slide.

Parameters:slideshow_widget – pisak slideshow instance.
pisak.viewer.handlers.remove_photo_from_favourites(slideshow_widget)[source]

Remove the currently displayed photo from the favourites.

Parameters:slideshow_widget – pisak slideshow instance.
pisak.viewer.handlers.rotate(slide_space)[source]

Rotate the photo for 90 degrees.

Parameters:slide_space – container with the pisak slide instance inside.
pisak.viewer.handlers.save(slide_space)[source]

Save the photo.

Parameters:slide_space – container with the pisak slide instance inside.
pisak.viewer.handlers.sepia(slide_space)[source]

Apply a sepia effect to the photo.

Parameters:slide_space – container with the pisak slide instance inside.
pisak.viewer.handlers.slideshow_toggle(slideshow_widget)[source]

Turn on or turn off the automatic slideshow.

Parameters:slideshow_widget – pisak slideshow instance.
pisak.viewer.handlers.solarize(slide_space)[source]

Apply a solarize effect to the photo.

Parameters:slide_space – container with the pisak slide instance inside.
pisak.viewer.handlers.zoom(slide_space)[source]

Zoom the photo.

Parameters:slide_space – container with the pisak slide instance inside.