Hoogle Search

Within LTS Haskell 24.20 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. type PrintOperationCustomWidgetApplyCallback = Widget -> IO ()

    gi-gtk3 GI.Gtk.Objects.PrintOperation

    Emitted right before PrintOperation::beginPrint if you added a custom widget in the PrintOperation::createCustomWidget handler. When you get this signal you should read the information from the custom widgets, as the widgets are not guaraneed to be around at a later time. Since: 2.10

  2. type PrintOperationDoneCallback = PrintOperationResult -> IO ()

    gi-gtk3 GI.Gtk.Objects.PrintOperation

    Emitted when the print operation run has finished doing everything required for printing. result gives you information about what happened during the run. If result is PrintOperationResultError then you can call printOperationGetError for more information. If you enabled print status tracking then printOperationIsFinished may still return False after PrintOperation::done was emitted. Since: 2.10

  3. type PrintOperationDrawPageCallback = PrintContext -> Int32 -> IO ()

    gi-gtk3 GI.Gtk.Objects.PrintOperation

    Emitted for every page that is printed. The signal handler must render the pageNr's page onto the cairo context obtained from context using printContextGetCairoContext.

    C code

    static void
    draw_page (GtkPrintOperation *operation,
    GtkPrintContext   *context,
    gint               page_nr,
    gpointer           user_data)
    {
    cairo_t *cr;
    PangoLayout *layout;
    gdouble width, text_height;
    gint layout_height;
    PangoFontDescription *desc;
    
    cr = gtk_print_context_get_cairo_context (context);
    width = gtk_print_context_get_width (context);
    
    cairo_rectangle (cr, 0, 0, width, HEADER_HEIGHT);
    
    cairo_set_source_rgb (cr, 0.8, 0.8, 0.8);
    cairo_fill (cr);
    
    layout = gtk_print_context_create_pango_layout (context);
    
    desc = pango_font_description_from_string ("sans 14");
    pango_layout_set_font_description (layout, desc);
    pango_font_description_free (desc);
    
    pango_layout_set_text (layout, "some text", -1);
    pango_layout_set_width (layout, width * PANGO_SCALE);
    pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
    
    pango_layout_get_size (layout, NULL, &layout_height);
    text_height = (gdouble)layout_height / PANGO_SCALE;
    
    cairo_move_to (cr, width / 2,  (HEADER_HEIGHT - text_height) / 2);
    pango_cairo_show_layout (cr, layout);
    
    g_object_unref (layout);
    }
    
    Use printOperationSetUseFullPage and printOperationSetUnit before starting the print operation to set up the transformation of the cairo context according to your needs. Since: 2.10

  4. type PrintOperationEndPrintCallback = PrintContext -> IO ()

    gi-gtk3 GI.Gtk.Objects.PrintOperation

    Emitted after all pages have been rendered. A handler for this signal can clean up any resources that have been allocated in the PrintOperation::beginPrint handler. Since: 2.10

  5. type PrintOperationPaginateCallback = PrintContext -> IO Bool

    gi-gtk3 GI.Gtk.Objects.PrintOperation

    Emitted after the PrintOperation::beginPrint signal, but before the actual rendering starts. It keeps getting emitted until a connected signal handler returns True. The paginate signal is intended to be used for paginating a document in small chunks, to avoid blocking the user interface for a long time. The signal handler should update the number of pages using printOperationSetNPages, and return True if the document has been completely paginated. If you don't need to do pagination in chunks, you can simply do it all in the beginPrint handler, and set the number of pages from there. Since: 2.10

  6. type PrintOperationPreviewCallback = PrintOperationPreview -> PrintContext -> Maybe Window -> IO Bool

    gi-gtk3 GI.Gtk.Objects.PrintOperation

    Gets emitted when a preview is requested from the native dialog. The default handler for this signal uses an external viewer application to preview. To implement a custom print preview, an application must return True from its handler for this signal. In order to use the provided context for the preview implementation, it must be given a suitable cairo context with printContextSetCairoContext. The custom preview implementation can use printOperationPreviewIsSelected and printOperationPreviewRenderPage to find pages which are selected for print and render them. The preview must be finished by calling printOperationPreviewEndPreview (typically in response to the user clicking a close button). Since: 2.10

  7. type PrintOperationRequestPageSetupCallback = PrintContext -> Int32 -> PageSetup -> IO ()

    gi-gtk3 GI.Gtk.Objects.PrintOperation

    Emitted once for every page that is printed, to give the application a chance to modify the page setup. Any changes done to setup will be in force only for printing this page. Since: 2.10

  8. type PrintOperationStatusChangedCallback = IO ()

    gi-gtk3 GI.Gtk.Objects.PrintOperation

    Emitted at between the various phases of the print operation. See PrintStatus for the phases that are being discriminated. Use printOperationGetStatus to find out the current status. Since: 2.10

  9. type PrintOperationUpdateCustomWidgetCallback = Widget -> PageSetup -> PrintSettings -> IO ()

    gi-gtk3 GI.Gtk.Objects.PrintOperation

    Emitted after change of selected printer. The actual page setup and print settings are passed to the custom widget, which can actualize itself according to this change. Since: 2.18

  10. module GI.Gtk.Objects.PrintSettings

    A GtkPrintSettings object represents the settings of a print dialog in a system-independent way. The main use for this object is that once you’ve printed you can get a settings object that represents the settings the user chose, and the next time you print you can pass that object in so that the user doesn’t have to re-set all his settings. Its also possible to enumerate the settings so that you can easily save the settings for the next time your app runs, or even store them in a document. The predefined keys try to use shared values as much as possible so that moving such a document between systems still works. Printing support was added in GTK+ 2.10.

Page 124 of many | Previous | Next