Top | ![]() |
![]() |
![]() |
![]() |
GnomePrintConfig * | gnome_print_config_default () |
GnomePrintConfig * | gnome_print_config_ref () |
GnomePrintConfig * | gnome_print_config_unref () |
GnomePrintConfig * | gnome_print_config_dup () |
guchar * | gnome_print_config_get () |
gboolean | gnome_print_config_set () |
gboolean | gnome_print_config_get_boolean () |
gboolean | gnome_print_config_get_int () |
gboolean | gnome_print_config_get_double () |
gboolean | gnome_print_config_get_length () |
gboolean | gnome_print_config_set_boolean () |
gboolean | gnome_print_config_set_int () |
gboolean | gnome_print_config_set_double () |
gboolean | gnome_print_config_set_length () |
void | gnome_print_config_dump () |
GnomePrintConfig *
gnome_print_config_default (void
);
Creates a GnomePrintConfig object with the default printer and settings.
GnomePrintConfig *
gnome_print_config_ref (GnomePrintConfig *config
);
Increase the reference count on the GnomePrintConfig object by one.
GnomePrintConfig *
gnome_print_config_unref (GnomePrintConfig *config
);
Decrease the reference count on the GnomePrintConfig object by one.
GnomePrintConfig *
gnome_print_config_dup (GnomePrintConfig *config
);
Does a deep copy of the config config
. You should unref the returned
GnomePrintConfig using gnome_print_config_unref when you are finished
using it.
guchar * gnome_print_config_get (GnomePrintConfig *config
,const guchar *key
);
Gets the value of string key
from the GnomePrintConfig object. The returned string
should be freed with g_free when you are finished with it.
config |
Pointer to a GnomePrintConfig object |
|
key |
String containing the path of key whose value is to be obtained |
gboolean gnome_print_config_set (GnomePrintConfig *config
,const guchar *key
,const guchar *value
);
Sets the value of string key
in the GnomePrintConfig object to value value
.
config |
Pointer to a GnomePrintConfig object |
|
key |
String containing the path of key whose value is to be set |
|
value |
String containing the value to set |
gboolean gnome_print_config_get_boolean (GnomePrintConfig *config
,const guchar *key
,gboolean *val
);
Gets the value of key key
from the GnomePrintConfig object. Converts values such
as "true", "y", "yes", and their opposites, to their boolean equivalent. The
boolean value will be stored in the variable val
.
config |
Pointer to a GnomePrintConfig object |
|
key |
String containing the path of key whose value is to be obtained |
|
val |
Pointer to a boolean variable to store the value in. Should initially be |
gboolean gnome_print_config_get_int (GnomePrintConfig *config
,const guchar *key
,gint *val
);
Gets the value of key key
from the GnomePrintConfig object. Converts values
to their integer equivalent. The integer value will be stored in the variable
val
.
config |
Pointer to a GnomePrintConfig object |
|
key |
String containing the path of key whose value is to be obtained |
|
val |
Pointer to a integer variable to store the value in. Should initially be |
gboolean gnome_print_config_get_double (GnomePrintConfig *config
,const guchar *key
,gdouble *val
);
Gets the value of key key
from the GnomePrintConfig object. Converts values
to their double equivalent. The double value will be stored in the variable
val
.
config |
Pointer to a GnomePrintConfig object |
|
key |
String containing the path of key whose value is to be obtained |
|
val |
Pointer to a double variable to store the value in. Should initially be |
gboolean gnome_print_config_get_length (GnomePrintConfig *config
,const guchar *key
,gdouble *val
,const GnomePrintUnit **unit
);
Gets the value of key key
from the GnomePrintConfig object. Converts values
to their double equivalent. The double value will be stored in the variable
val
and the units will be stored in unit
. You should allocate the storage
for unit
before calling this function.
config |
Pointer to a GnomePrintConfig object |
|
key |
String containing the path of key whose value is to be obtained |
|
val |
Pointer to a double variable to store the value in. Should initially be |
|
unit |
Pointer to an already allocated GnomePrintUnit struct |
gboolean gnome_print_config_set_boolean (GnomePrintConfig *config
,const guchar *key
,gboolean val
);
Set a boolean
value in the GnomePrintConfig object.
config |
Pointer to a GnomePrintConfig object |
|
key |
String containing the path of key whose value is to be set |
|
val |
Boolean containing the value to set |
gboolean gnome_print_config_set_int (GnomePrintConfig *config
,const guchar *key
,gint val
);
Set an integer
value in the GnomePrintConfig object.
config |
Pointer to a GnomePrintConfig object |
|
key |
String containing the path of key whose value is to be set |
|
val |
Integer containing the value to set |
gboolean gnome_print_config_set_double (GnomePrintConfig *config
,const guchar *key
,gdouble val
);
Set a double
value in the GnomePrintConfig object.
config |
Pointer to a GnomePrintConfig object |
|
key |
String containing the path of key whose value is to be set |
|
val |
Double containing the value to set |
gboolean gnome_print_config_set_length (GnomePrintConfig *config
,const guchar *key
,gdouble val
,const GnomePrintUnit *unit
);
Sets a double value and the units it is using. This should be used in conjunction with gnome_print_config_get_length.
config |
Pointer to a GnomePrintConfig object |
|
key |
String containing the path of key whose value is to be set |
|
val |
Double containing the value to set |
|
unit |
Units to use when setting value |
void
gnome_print_config_dump (GnomePrintConfig *gpc
);
Print out the tree structure representing the GnomePrintConfig. Output
is to STDOUT
and is limited to a depth of 20.
#define GNOME_PRINT_KEY_PAPER_SIZE "Settings.Output.Media.PhysicalSize" /* Paper name, such as A4 or Letter */
#define GNOME_PRINT_KEY_PAPER_WIDTH "Settings.Output.Media.PhysicalSize.Width" /* Arbitrary units - use conversion */
#define GNOME_PRINT_KEY_PAPER_HEIGHT "Settings.Output.Media.PhysicalSize.Height" /* Arbitrary units - use conversion */
#define GNOME_PRINT_KEY_PAPER_ORIENTATION "Settings.Output.Media.PhysicalOrientation" /* R0, R90, R180, R270 */
#define GNOME_PRINT_KEY_PAPER_ORIENTATION_MATRIX "Settings.Output.Media.PhysicalOrientation.Paper2PrinterTransform" /* 3x2 abstract matrix */
#define GNOME_PRINT_KEY_PAGE_ORIENTATION "Settings.Document.Page.LogicalOrientation" /* R0, R90, R180, R270 */
#define GNOME_PRINT_KEY_PAGE_ORIENTATION_MATRIX "Settings.Document.Page.LogicalOrientation.Page2LayoutTransform" /* 3x2 abstract matrix */
#define GNOME_PRINT_KEY_LAYOUT "Settings.Document.Page.Layout" /* Id of layout ('Plain' is always no-special-layout) */
#define GNOME_PRINT_KEY_LAYOUT_WIDTH "Settings.Document.Page.Layout.Width" /* Double value */
#define GNOME_PRINT_KEY_LAYOUT_HEIGHT "Settings.Document.Page.Layout.Height" /* Double value */
#define GNOME_PRINT_KEY_RESOLUTION "Settings.Output.Resolution" /* String value, like 300x300 or 300dpi */
#define GNOME_PRINT_KEY_RESOLUTION_DPI "Settings.Output.Resolution.DPI" /* Numeric value, like 300, if meaningful */
#define GNOME_PRINT_KEY_RESOLUTION_DPI_X "Settings.Output.Resolution.DPI.X" /* Numeric value */
#define GNOME_PRINT_KEY_RESOLUTION_DPI_Y "Settings.Output.Resolution.DPI.Y" /* Numeric value */
#define GNOME_PRINT_KEY_NUM_COPIES "Settings.Output.Job.NumCopies" /* Number of copies */
#define GNOME_PRINT_KEY_COLLATE "Settings.Output.Job.Collate" /* Boolean (true|yes|1 false|no|0) */
#define GNOME_PRINT_KEY_PAGE_MARGIN_LEFT "Settings.Document.Page.Margins.Left" /* Length, i.e. use conversion */
#define GNOME_PRINT_KEY_PAGE_MARGIN_RIGHT "Settings.Document.Page.Margins.Right" /* Length, i.e. use conversion */
#define GNOME_PRINT_KEY_PAGE_MARGIN_TOP "Settings.Document.Page.Margins.Top" /* Length, i.e. use conversion */
#define GNOME_PRINT_KEY_PAGE_MARGIN_BOTTOM "Settings.Document.Page.Margins.Bottom" /* Length, i.e. use conversion */
#define GNOME_PRINT_KEY_PAPER_MARGIN_LEFT "Settings.Output.Media.Margins.Left" /* Length, i.e. use conversion */
#define GNOME_PRINT_KEY_PAPER_MARGIN_RIGHT "Settings.Output.Media.Margins.Right" /* Length, i.e. use conversion */
#define GNOME_PRINT_KEY_PAPER_MARGIN_TOP "Settings.Output.Media.Margins.Top" /* Length, i.e. use conversion */
#define GNOME_PRINT_KEY_PAPER_MARGIN_BOTTOM "Settings.Output.Media.Margins.Bottom" /* Length, i.e. use conversion */
#define GNOME_PRINT_KEY_OUTPUT_FILENAME "Settings.Output.Job.FileName" /* Filename used when printing to file. */
#define GNOME_PRINT_KEY_DOCUMENT_NAME "Settings.Document.Name" /* The name of the document 'Cash flow 2002', `Grandma cookie recipies' */