fpi-print: Expose a method to get the internal print type

We could use the property, but a getter is handier to use
This commit is contained in:
Marco Trevisan (Treviño)
2026-07-13 12:09:35 +02:00
parent 0abe22bd94
commit 73f641344b
2 changed files with 18 additions and 0 deletions
+16
View File
@@ -79,6 +79,22 @@ fpi_print_set_type (FpPrint *print,
g_object_notify (G_OBJECT (print), "fpi-type");
}
/**
* fpi_print_get_type:
* @print: A #FpPrint
*
* Retrieves the type of the print data.
*
* Returns: The #FpiPrintType of the print.
*/
FpiPrintType
fpi_print_get_type (FpPrint *print)
{
g_return_val_if_fail (FP_IS_PRINT (print), FPI_PRINT_UNDEFINED);
return print->type;
}
/**
* fpi_print_set_device_stored:
* @print: A #FpPrint
+2
View File
@@ -36,6 +36,8 @@ void fpi_print_add_print (FpPrint *print,
void fpi_print_set_type (FpPrint *print,
FpiPrintType type);
FpiPrintType fpi_print_get_type (FpPrint *print);
gboolean fpi_print_match (FpPrint *self,
FpPrint *other);