Hoogle Search

Within LTS Haskell 24.41 (ghc-9.10.3)

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

  1. printJobSetPageRanges :: (HasCallStack, MonadIO m, IsPrintJob a) => a -> [PageRange] -> m ()

    gi-gtk4 GI.Gtk.Objects.PrintJob

    Sets the page ranges for this job.

  2. printJobSetPageSet :: (HasCallStack, MonadIO m, IsPrintJob a) => a -> PageSet -> m ()

    gi-gtk4 GI.Gtk.Objects.PrintJob

    Sets the GtkPageSet setting for this job.

  3. printJobSetPages :: (HasCallStack, MonadIO m, IsPrintJob a) => a -> PrintPages -> m ()

    gi-gtk4 GI.Gtk.Objects.PrintJob

    Sets the GtkPrintPages setting for this job.

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

    gi-gtk4 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,
    int                page_nr,
    gpointer           user_data)
    {
    cairo_t *cr;
    PangoLayout *layout;
    double width, text_height;
    int 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 = (double)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.

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

    gi-gtk4 GI.Gtk.Objects.PrintOperation

    Emitted once for every page that is printed. This gives the application a chance to modify the page setup. Any changes done to setup will be in force only for printing this page.

  6. afterPrintOperationDrawPage :: (IsPrintOperation a, MonadIO m) => a -> ((?self :: a) => PrintOperationDrawPageCallback) -> m SignalHandlerId

    gi-gtk4 GI.Gtk.Objects.PrintOperation

    Connect a signal handler for the drawPage signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after printOperation #drawPage callback
    
    By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

  7. afterPrintOperationRequestPageSetup :: (IsPrintOperation a, MonadIO m) => a -> ((?self :: a) => PrintOperationRequestPageSetupCallback) -> m SignalHandlerId

    gi-gtk4 GI.Gtk.Objects.PrintOperation

    Connect a signal handler for the requestPageSetup signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after printOperation #requestPageSetup callback
    
    By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

  8. clearPrintOperationDefaultPageSetup :: (MonadIO m, IsPrintOperation o) => o -> m ()

    gi-gtk4 GI.Gtk.Objects.PrintOperation

    Set the value of the “default-page-setup” property to Nothing. When overloading is enabled, this is equivalent to

    clear #defaultPageSetup
    

  9. constructPrintOperationCurrentPage :: (IsPrintOperation o, MonadIO m) => Int32 -> m (GValueConstruct o)

    gi-gtk4 GI.Gtk.Objects.PrintOperation

    Construct a GValueConstruct with valid value for the “current-page” property. This is rarely needed directly, but it is used by new.

  10. constructPrintOperationDefaultPageSetup :: (IsPrintOperation o, MonadIO m, IsPageSetup a) => a -> m (GValueConstruct o)

    gi-gtk4 GI.Gtk.Objects.PrintOperation

    Construct a GValueConstruct with valid value for the “default-page-setup” property. This is rarely needed directly, but it is used by new.

Page 331 of many | Previous | Next