Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- GOffice.add_epsilon(x)¶
-
Returns the next-larger representable
GOffice.value
, except that zero and infinites are returned unchanged.
- GOffice.arrow_type_as_str(typ)¶
- Parameters:
typ (
GOffice.ArrowType
) –- Return type:
- GOffice.ascii_strcase_equal(v, v2)¶
- GOffice.ascii_strtod(s, end)¶
- Parameters:
- Return type:
Like
GLib.ascii_strtod
, but without hex notation and MS extensions. There is no need to reset errno before calling this.
- GOffice.atan2pi(y, x)¶
- GOffice.atanpi(x)¶
- GOffice.atk_setup_label(label, target)¶
- Parameters:
label (
Gtk.Widget
) –Gtk.Widget
target (
Gtk.Widget
) –Gtk.Widget
A convenience routine to setup label-for/labeled-by relationship between a pair of widgets
- GOffice.basename_from_uri(uri)¶
-
Decode the final path component. Returns as UTF-8 encoded suitable for display.
- GOffice.bezier_spline_init(x, y, n, closed)¶
- Parameters:
- Returns:
a newly created struct
GOffice.BezierSpline
instance which should be destroyed by a call toGOffice.BezierSpline.destroy
.- Return type:
x and y values must be valid and finite. The returned structure contains the x and y coordinates of all control points, including the incoming data. the n and closed fields are just copies of the corresponding arguments.
- GOffice.cairo_convert_data_from_pixbuf(dst, src, width, height, rowstride)¶
- Parameters:
Converts the pixel data stored in src in
GdkPixbuf.Colorspace.RGB
pixbuf format tocairo.Format.ARGB32
cairo format and move them to dst. If src == dst, pixel are converted in place.
- GOffice.cairo_convert_data_to_pixbuf(dst, src, width, height, rowstride)¶
- Parameters:
Converts the pixel data stored in src in
cairo.Format.ARGB32
cairo format toGdkPixbuf.Colorspace.RGB
pixbuf format and move them to dst. If src == dst, pixel are converted in place.
- GOffice.cairo_emit_svg_path(cr, path)¶
- Parameters:
cr (
cairo.Context
) – a cairo contextpath (
str
) – a SVG path
Emits a path described as a SVG path string (d property of path elements) to a cairo context.
- GOffice.cairo_surface_is_vector(surface)¶
- Parameters:
surface (
cairo.Surface
) –- Return type:
- GOffice.color_from_gdk_rgba(rgbacolor)¶
- GOffice.color_from_str(str)¶
- GOffice.color_selector_get_color(selector)¶
- Parameters:
selector (
GOffice.Selector
) – aGOffice.Selector
- Returns:
current color selection of selector.
- is_auto:
True
if the current selection was set by clicking on automatic palette item.
- Return type:
- GOffice.color_selector_set_allow_alpha(selector, allow_alpha)¶
- Parameters:
selector (
GOffice.Selector
) – #GOColorSelectorallow_alpha (
bool
) – IfTrue
, the selector will have an alpha channel.
Seta whether the custom colour selector should allow the use of opacity.
- GOffice.color_selector_set_color(selector, color)¶
- Parameters:
selector (
GOffice.Selector
) – #GOColorSelector to changecolor (
int
) – a #GOColor
- Returns:
True
if selection changed.- Return type:
Sets current selection to color. An “activate” signal will be emitted.
- GOffice.color_to_gdk_rgba(color, res)¶
- GOffice.complex_addl(dst, a, b)¶
- Parameters:
dst (
GOffice.Complexl
) –a (
GOffice.Complexl
) –b (
GOffice.Complexl
) –
- GOffice.complex_conjl(dst, src)¶
- Parameters:
dst (
GOffice.Complexl
) –src (
GOffice.Complexl
) –
- GOffice.complex_cosl(dst, src)¶
- Parameters:
dst (
GOffice.Complexl
) –src (
GOffice.Complexl
) –
- GOffice.complex_divl(dst, a, b)¶
- Parameters:
dst (
GOffice.Complexl
) –a (
GOffice.Complexl
) –b (
GOffice.Complexl
) –
- GOffice.complex_expl(dst, src)¶
- Parameters:
dst (
GOffice.Complexl
) –src (
GOffice.Complexl
) –
- GOffice.complex_from_stringl(dst, src, imunit)¶
- Parameters:
dst (
GOffice.Complexl
) –src (
str
) –imunit (
str
) –
- Return type:
- GOffice.complex_invalid_pl(src)¶
- Parameters:
src (
GOffice.Complexl
) –- Return type:
- GOffice.complex_invalidl(dst)¶
- Parameters:
dst (
GOffice.Complexl
) –
- GOffice.complex_lnl(dst, src)¶
- Parameters:
dst (
GOffice.Complexl
) –src (
GOffice.Complexl
) –
- GOffice.complex_mull(dst, a, b)¶
- Parameters:
dst (
GOffice.Complexl
) –a (
GOffice.Complexl
) –b (
GOffice.Complexl
) –
- GOffice.complex_powl(dst, a, b)¶
- Parameters:
dst (
GOffice.Complexl
) –a (
GOffice.Complexl
) –b (
GOffice.Complexl
) –
- GOffice.complex_real_pl(src)¶
- Parameters:
src (
GOffice.Complexl
) –- Return type:
- GOffice.complex_sinl(dst, src)¶
- Parameters:
dst (
GOffice.Complexl
) –src (
GOffice.Complexl
) –
- GOffice.complex_sqrtl(dst, src)¶
- Parameters:
dst (
GOffice.Complexl
) –src (
GOffice.Complexl
) –
- GOffice.complex_subl(dst, a, b)¶
- Parameters:
dst (
GOffice.Complexl
) –a (
GOffice.Complexl
) –b (
GOffice.Complexl
) –
- GOffice.complex_tanl(dst, src)¶
- Parameters:
dst (
GOffice.Complexl
) –src (
GOffice.Complexl
) –
- GOffice.complex_to_polar(mod, angle, src)¶
- Parameters:
mod (
float
) –angle (
float
) –src (
GOffice.Complex
) –
- GOffice.complex_to_stringl(src, reformat, imformat, imunit)¶
- Parameters:
src (
GOffice.Complexl
) –reformat (
str
) –imformat (
str
) –imunit (
int
) –
- Return type:
- GOffice.complex_zero_pl(src)¶
- Parameters:
src (
GOffice.Complexl
) –- Return type:
- GOffice.components_add_filter(chooser)¶
- Parameters:
chooser (
Gtk.FileChooser
) –
- GOffice.components_add_mime_type(mime, priority, service_id)¶
- Parameters:
mime (
str
) –priority (
GOffice.MimePriority
) –service_id (
str
) –
- GOffice.components_get_mime_types()¶
- Returns:
the list of mime types supported by at least one registered component.
- Return type:
[
str
]
- GOffice.conf_add_monitor(node, key, monitor, *data)¶
- Parameters:
node (
GOffice.ConfNode
) –GOffice.ConfNode
key (
str
) – configuration keymonitor (
GOffice.ConfMonitorFunc
) – #GOMonitorFunc
- Returns:
the signal ID.
- Return type:
monitor will be called whenever the
GOffice.value
associated with key changes.
- GOffice.conf_free_node(node)¶
- Parameters:
node (
GOffice.ConfNode
) –
- GOffice.conf_get_bool(node, key)¶
- Parameters:
node (
GOffice.ConfNode
) –key (
str
) –
- Return type:
- GOffice.conf_get_double(node, key)¶
- Parameters:
node (
GOffice.ConfNode
) –key (
str
) –
- Return type:
- GOffice.conf_get_enum_as_str(node, key)¶
- Parameters:
node (
GOffice.ConfNode
) –key (
str
) –
- Return type:
- GOffice.conf_get_int(node, key)¶
- Parameters:
node (
GOffice.ConfNode
) –key (
str
) –
- Return type:
- GOffice.conf_get_node(parent, key)¶
- Parameters:
parent (
GOffice.ConfNode
) – parent node orNone
key (
str
) – configuration key
- Returns:
the
GOffice.ConfNode
associated with key- Return type:
- GOffice.conf_get_str_list(node, key)¶
- Parameters:
node (
GOffice.ConfNode
) –GOffice.ConfNode
key (
str
) – configuration key
- Returns:
a list of strings asociated with key.
- Return type:
[
str
]
- GOffice.conf_get_string(node, key)¶
- Parameters:
node (
GOffice.ConfNode
) –key (
str
) –
- Return type:
- GOffice.conf_load_bool(node, key, default_val)¶
- Parameters:
node (
GOffice.ConfNode
) –key (
str
) –default_val (
bool
) –
- Return type:
- GOffice.conf_load_double(node, key, minima, maxima, default_val)¶
- GOffice.conf_load_enum(node, key, t, default_val)¶
- Parameters:
node (
GOffice.ConfNode
) –key (
str
) –t (
GObject.GType
) –default_val (
int
) –
- Return type:
- GOffice.conf_load_int(node, key, minima, maxima, default_val)¶
- GOffice.conf_load_str_list(node, key)¶
- Parameters:
node (
GOffice.ConfNode
) –GOffice.ConfNode
key (
str
) – configuration key
- Returns:
a list of strings asociated with key.
- Return type:
[
str
]
- GOffice.conf_load_string(node, key)¶
- Parameters:
node (
GOffice.ConfNode
) –key (
str
) –
- Return type:
- GOffice.conf_set_bool(node, key, val)¶
- Parameters:
node (
GOffice.ConfNode
) –key (
str
) –val (
bool
) –
- GOffice.conf_set_double(node, key, val)¶
- Parameters:
node (
GOffice.ConfNode
) –key (
str
) –val (
float
) –
- GOffice.conf_set_enum(node, key, t, val)¶
- Parameters:
node (
GOffice.ConfNode
) –key (
str
) –t (
GObject.GType
) –val (
int
) –
- GOffice.conf_set_int(node, key, val)¶
- Parameters:
node (
GOffice.ConfNode
) –key (
str
) –val (
int
) –
- GOffice.conf_set_str_list(node, key, list)¶
- Parameters:
node (
GOffice.ConfNode
) –GOffice.ConfNode
key (
str
) – configuration keylist ([
str
]) – the list of strings to set.
Sets list as the
GOffice.value
for key.
- GOffice.conf_set_string(node, key, str)¶
- Parameters:
node (
GOffice.ConfNode
) –key (
str
) –str (
str
) –
- GOffice.conf_sync(node)¶
- Parameters:
node (
GOffice.ConfNode
) –
- GOffice.continued_fraction(val, max_denom, res_num, res_denom)¶
- GOffice.cospi(x)¶
- GOffice.cotpi(x)¶
- GOffice.coup_cd(res, settle, mat, freq, eom, next)¶
- GOffice.coupdaybs(settlement, maturity, conv)¶
- Parameters:
- Returns:
the number of days from the beginning of the coupon period to the settlement date.
- Return type:
- GOffice.coupdays(settlement, maturity, conv)¶
- Parameters:
- Returns:
the number of days in the coupon period of the settlement date. Currently, returns negative numbers if the branch is not implemented.
- Return type:
- GOffice.coupdaysnc(settlement, maturity, conv)¶
- GOffice.create_std_tags_for_buffer(buffer)¶
- Parameters:
buffer (
Gtk.TextBuffer
) –
- GOffice.cspline_destroyl(sp)¶
- Parameters:
sp (
GOffice.CSplinel
) – a spline structure returned by go_cspline_init.
Frees the spline structure when done.
- GOffice.date_conv_equal(a, b)¶
- Parameters:
a (
GOffice.DateConventions
) –b (
GOffice.DateConventions
) –
- Return type:
- GOffice.date_conv_translate(f, src, dst)¶
- Parameters:
f (
float
) –src (
GOffice.DateConventions
) –dst (
GOffice.DateConventions
) –
- Return type:
- GOffice.date_convention_base(conv)¶
- Parameters:
conv (
GOffice.DateConventions
) –- Return type:
- GOffice.date_days_between_basis(from_, to, basis)¶
- Parameters:
from (
GLib.Date
) –to (
GLib.Date
) –basis (
GOffice.BasisType
) –
- Return type:
- GOffice.date_g_months_between(date1, date2)¶
- GOffice.date_g_to_serial(date, conv)¶
- Parameters:
date (
GLib.Date
) –conv (
GOffice.DateConventions
) –
- Return type:
- GOffice.date_g_years_between(date1, date2)¶
- GOffice.date_month_name(m, abbrev)¶
- Parameters:
m (
GLib.DateMonth
) –abbrev (
bool
) –
- Return type:
- GOffice.date_serial_to_g(res, serial, conv)¶
- Parameters:
res (
GLib.Date
) –serial (
int
) –conv (
GOffice.DateConventions
) –
- GOffice.date_serial_to_timet(serial, conv)¶
- Parameters:
serial (
int
) –conv (
GOffice.DateConventions
) –
- Return type:
- GOffice.date_timet_to_serial(t, conv)¶
- Parameters:
t (
int
) –conv (
GOffice.DateConventions
) –
- Return type:
- GOffice.date_timet_to_serial_raw(t, conv)¶
- Parameters:
t (
int
) –conv (
GOffice.DateConventions
) –
- Return type:
- GOffice.date_weekday_name(wd, abbrev)¶
- Parameters:
wd (
GLib.DateWeekday
) –abbrev (
bool
) –
- Return type:
- GOffice.date_weeknum(date, method)¶
- GOffice.dcauchy(x, location, scale, give_log)¶
- GOffice.destroy_password(passwd)¶
- Parameters:
passwd (
str
) – The buffer to clear
Overwrite a string holding a password. This is a separate routine to ensure that the compiler does not try to outsmart us.
Note: this does not free the memory.
- GOffice.dialog_guess_alternative_button_order(dialog)¶
- Parameters:
dialog (
Gtk.Dialog
) –Gtk.Dialog
This function inspects the buttons in the dialog and comes up with a reasonable alternative dialog order.
- GOffice.direction_get_name(d)¶
- Parameters:
d (
GOffice.Direction
) –- Return type:
- GOffice.direction_is_forward(d)¶
- Parameters:
- Returns:
- Return type:
- GOffice.direction_is_horizontal(d)¶
- Parameters:
- Returns:
True
forGOffice.Direction.LEFT
andGOffice.Direction.RIGHT
.- Return type:
- GOffice.dirname_from_uri(uri, brief)¶
- Parameters:
- Returns:
UTF-8 encoded directory part.
- Return type:
Decode the all but the final path component. Returns as UTF-8 encoded suitable for display.
- GOffice.dlnorm(x, meanlog, sdlog, give_log)¶
- GOffice.dnorm(x, mu, sigma, give_log)¶
- GOffice.dweibull(x, shape, scale, give_log)¶
- GOffice.exponential_regression(xss, dim, ys, n, affine, res)¶
- Parameters:
- Returns:
GOffice.RegressionResult
as above.- stat_:
storage for additional results.
- Return type:
(
GOffice.RegressionResult
, stat_:GOffice.go_regression_stat_t
)
Performs one-dimensional linear regressions on the input points. Fits to “y = b * m1^x1 * … * md^xd “ or equivalently to “log y = log b + x1 * log m1 + … + xd * log md”.
- GOffice.exponential_regression_as_log(xss, dim, ys, n, affine, res)¶
- Parameters:
- Returns:
GOffice.RegressionResult
as above.- stat_:
storage for additional results.
- Return type:
(
GOffice.RegressionResult
, stat_:GOffice.go_regression_stat_t
)
Performs one-dimensional linear regressions on the input points as
GOffice.exponential_regression
, but returns the logarithm of the coefficients instead or the coefficients themselves. Fits to “y = b * exp (m1*x1) * … * exp (md*xd) “ or equivalently to “ln y = ln b + x1 * m1 + … + xd * md”.
- GOffice.fake_ceil(x)¶
- GOffice.fake_floor(x)¶
- GOffice.file_create(uri)¶
-
Creates a file or return an error. If the file already exists, it is replaced.
- GOffice.file_get_modtime(uri)¶
- Parameters:
uri (
str
) – The uri- Returns:
the modification time of the file.
- Return type:
Determine the last modification time of uri.
- GOffice.file_open(uri)¶
-
Try all available methods to open a file or return an error
- GOffice.file_split_urls(data)¶
- Parameters:
data (
str
) – a string filled with a list of URIs separated by new lines.- Returns:
the URIs list.
- Return type:
[
str
]
Splits the chain into a list of URIs. Lines starting with ‘#’ are ignored.
- GOffice.filename_simplify(filename, dotdot, make_absolute)¶
- Parameters:
filename (
str
) –dotdot (
GOffice.DotDot
) –make_absolute (
bool
) –
- Return type:
- GOffice.font_cache_register(callback)¶
- Parameters:
callback (
GObject.Closure
) –
- GOffice.font_cache_unregister(callback)¶
- Parameters:
callback (
GObject.Closure
) –
- GOffice.fonts_list_families(context)¶
- Parameters:
context (
Pango.Context
) –Pango.Context
- Returns:
a sorted list of strings of
GOffice.font
family names.- Return type:
[
str
]
- GOffice.fonts_list_sizes()¶
- Returns:
a sorted list of
GOffice.font
sizes in Pango units.- Return type:
[
int
]
- GOffice.format_default_accounting()¶
- Returns:
the default accounting format
- Return type:
- GOffice.format_default_date()¶
- Returns:
the default date format
- Return type:
- GOffice.format_default_date_time()¶
- Returns:
the default date-and-time format
- Return type:
- GOffice.format_default_money()¶
- Returns:
the default monetary format
- Return type:
- GOffice.format_default_percentage()¶
- Returns:
the default percentage format
- Return type:
- GOffice.format_default_time()¶
- Returns:
the default time format
- Return type:
- GOffice.format_empty()¶
- Returns:
the empty format
- Return type:
- GOffice.format_foreach(func, *user_data)¶
- Parameters:
func (
GLib.HFunc
) – function to execute for each known format
Executes func for each registered
GOffice.Format
- GOffice.format_general()¶
- Returns:
the general format
- Return type:
- GOffice.format_generate_number_str(dst, min_digits, num_decimals, thousands_sep, negative_red, negative_paren, prefix, postfix)¶
- Parameters:
dst (
GLib.String
) –GLib.String
to append format string to.min_digits (
int
) – minimum number of digits before decimal separator.num_decimals (
int
) – number of decimalsthousands_sep (
bool
) – if true, use a thousands separator.negative_red (
bool
) – if true, make negative values red.negative_paren (
bool
) – if true, enclose negative values in parentheses.prefix (
str
) – optional string to place before number part of the formatpostfix (
str
) – optional string to place after number part of the format
Generates a format string for a number format with the given parameters and appends it to dst.
- GOffice.format_generate_str(dst, details)¶
- Parameters:
dst (
GLib.String
) –details (
GOffice.FormatDetails
) –
- GOffice.format_locale_currency()¶
- Returns:
The
GOffice.FormatCurrency
matches the current locale.- Return type:
- GOffice.format_measure_pango(str, layout)¶
- Parameters:
str (
GLib.String
) –layout (
Pango.Layout
) –
- Return type:
- GOffice.format_measure_strlen(str, layout)¶
- Parameters:
str (
GLib.String
) –layout (
Pango.Layout
) –
- Return type:
- GOffice.format_measure_zero(str, layout)¶
- Parameters:
str (
GLib.String
) –layout (
Pango.Layout
) –
- Return type:
- GOffice.format_output_to_odf(xout, fmt, cond_part, name, with_extension)¶
- Parameters:
xout (
Gsf.XMLOut
) –fmt (
GOffice.Format
) –cond_part (
int
) –name (
str
) –with_extension (
bool
) –
- Return type:
- GOffice.format_palette_index_from_color(c)¶
- GOffice.format_str_delocalize(str)¶
- Parameters:
str (
str
) – A *valid* localized format string- Returns:
a non-local format string, or
None
if the format was not valid.- Return type:
De-localizes the given format string, i.e., changes locale’s decimal separators to dots and performs other such transformations.
- GOffice.format_str_localize(str)¶
- Parameters:
str (
str
) – A *valid* format string- Returns:
a localized format string, or
None
if the format was not valid.- Return type:
Localizes the given format string, i.e., changes decimal dots to the locale’s notion of that and performs other such transformations.
- GOffice.format_value_gstring(layout, str, measure, metrics, fmt, val, type, sval, go_color, col_width, date_conv, unicode_minus)¶
- Parameters:
layout (
Pango.Layout
) – OptionalPango.Layout
, probably preseeded withGOffice.font
attribute.str (
GLib.String
) – aGLib.String
to store (not append!) the resulting string in.measure (
GOffice.FormatMeasure
) – Function to measure width of string/layout.metrics (
GOffice.FontMetrics
) – Font metrics corresponding to measure.fmt (
GOffice.Format
) –GOffice.Format
val (
float
) – floating-pointGOffice.value
. Must be finite.type (
int
) – a format charactersval (
str
) – a string to append to str after valgo_color (
int
) – a color to rendercol_width (
int
) – intended max width of layout in pango units. -1 means no restriction.date_conv (
GOffice.DateConventions
) –GOffice.DateConventions
unicode_minus (
bool
) – Use unicode minuses, not hyphens.
- Returns:
- Return type:
Render a floating-point
GOffice.value
into layout in such a way that the layouting width does not needlessly exceed col_width. Optionally use unicode minus instead of hyphen.
- GOffice.fourier_fft(in_, n, skip, fourier, inverse)¶
- Parameters:
in (
GOffice.Complex
) –n (
int
) –skip (
int
) –fourier (
GOffice.Complex
) –inverse (
bool
) –
- GOffice.fourier_fftl(in_, n, skip, fourier, inverse)¶
- Parameters:
in (
GOffice.Complexl
) –n (
int
) –skip (
int
) –fourier (
GOffice.Complexl
) –inverse (
bool
) –
- GOffice.gdk_pixbuf_get_from_cache(filename)¶
- Parameters:
filename (
str
) – pixbuf filename- Returns:
a
GdkPixbuf.Pixbuf
,None
on error.- Return type:
Retrieves a pixbuf from the image cache, loading it from the file filename located in goffice_icon_dir if not cached yet.
- GOffice.gdk_pixbuf_load_from_file(filename)¶
- Parameters:
filename (
str
) – pixbuf filename- Returns:
a
GdkPixbuf.Pixbuf
that the caller is responsible for.- Return type:
Utility routine to create pixbufs from file name in the goffice_icon_dir. As a special case, filename may have the form “res:<resource name>” in which case the resource manager is queried instead of loading a file.
New in version 0.9.6.
- GOffice.geometry_AABR_add(aabr0, aabr1)¶
- Parameters:
aabr0 (
GOffice.GeometryAABR
) – aGOffice.GeometryAABR
aabr1 (
GOffice.GeometryAABR
) – aGOffice.GeometryAABR
- Returns:
- Return type:
aabr0:
GOffice.GeometryAABR
Computes the Axis Aligned Bounding Rectangle of aabr0 and aabr1, and stores result in aabr0.
- GOffice.geometry_OBR_to_AABR(obr)¶
- Parameters:
obr (
GOffice.GeometryOBR
) – aGOffice.GeometryOBR
- Returns:
- Return type:
aabr:
GOffice.GeometryAABR
Stores Axis Aligned Bounding Rectangle of obr in aabr.
- GOffice.geometry_calc_label_anchor(obr, alpha)¶
- Parameters:
obr (
GOffice.GeometryOBR
) – bounding rectangle of labelalpha (
float
) – angle of axis
- Returns:
computed label anchor, to be used by
GOffice.geometry_calc_label_position
.- Return type:
- GOffice.geometry_calc_label_position(obr, alpha, offset, side, anchor)¶
- Parameters:
obr (
GOffice.GeometryOBR
) – bounding rectangle of labelalpha (
float
) – angle of axisoffset (
float
) – minimum distance between label and axisside (
GOffice.GeometrySide
) – side of label with respect to axisanchor (
GOffice.GeometrySide
) – where to anchor the label
- Returns:
the computed anchor if anchor ==
GOffice.GeometrySide.AUTO
, or anchorGOffice.value
.- Return type:
Convenience routine that computes position of a label relative to an axis.
- GOffice.geometry_cartesian_to_polar(x, y)¶
- Parameters:
- Returns:
- rho:
polar coordinate
- theta:
polar coordinate
- Return type:
Converts cartesion coordinates to polar coordinates.
- GOffice.geometry_get_rotation_type(alpha)¶
- Parameters:
alpha (
float
) – angle in radians- Returns:
- Return type:
Calculates rotation type for handling of special angles (alpha = n * pi / 2)
- GOffice.geometry_point_to_segment(xp, yp, xs, ys, w, h)¶
- GOffice.geometry_test_OBR_overlap(obr0, obr1)¶
- Parameters:
obr0 (
GOffice.GeometryOBR
) – aGOffice.GeometryOBR
obr1 (
GOffice.GeometryOBR
) – aGOffice.GeometryOBR
- Returns:
True
if OOBRs overlap- Return type:
Overlap test of Oriented Bounding Rectangles by the separating axis method.
- GOffice.get_file_openers()¶
- Returns:
list of known
GOffice.FileOpener
types (do not modify list)- Return type:
- GOffice.get_file_savers()¶
- Returns:
list of known
GOffice.FileSaver
types (do not modify list)- Return type:
- GOffice.get_mime_type(uri)¶
- GOffice.get_mime_type_for_data(data, data_size)¶
- GOffice.get_real_name()¶
- Returns:
a UTF-8 encoded string with the current user name.
- Return type:
- GOffice.gog_axis_map(map, value)¶
- Parameters:
map (
GOffice.GraphAxisMap
) – aGOffice.GraphAxisMap
value (
float
) –GOffice.value
to map to plot space.
- Returns:
mapped
GOffice.value
.- Return type:
Converts value to plot coordinates. A
GOffice.value
in [0,1.0] range means a data within axis bounds.
- GOffice.gog_guru(graph, dalloc, cc, closure)¶
- Parameters:
graph (
GOffice.GraphGraph
) – the graph to editdalloc (
GOffice.GraphDataAllocator
) – The data allocator to use for editingcc (
GOffice.CmdContext
) – Where to report errorsclosure (
GObject.Closure
) –GObject.Closure
- Returns:
the dialog, and shows new graph guru.
- Return type:
CHANGED 0.5.3 : drop the toplevel window argument and have the callers handle widget_show and set_transient
- GOffice.gog_guru_add_custom_widget(guru, custom)¶
- Parameters:
guru (
Gtk.Widget
) –custom (
Gtk.Widget
) –
- GOffice.gog_guru_get_help_button(guru)¶
- Parameters:
guru (
Gtk.Widget
) –Gtk.Widget
(the result ofGOffice.gog_guru
).- Returns:
Gtk.Widget
associated with the gurus help button.- Return type:
Quick utility to allow application specific help. Required until we clean up the relationship between goffice and gnumeric to decide which parts of the help live where.
- GOffice.gog_xml_read_state_get_obj(xin)¶
- Parameters:
- Returns:
the laset rerad
GOffice.GraphObject
- Return type:
- GOffice.gradient_dir_as_str(dir)¶
- Parameters:
dir (
GOffice.GradientDirection
) –- Return type:
- GOffice.gradient_selector_set_colors(selector, start, stop)¶
- Parameters:
selector (
GOffice.Selector
) –start (
int
) –stop (
int
) –
- GOffice.gtk_builder_combo_box_init_text(gui, widget_name)¶
- Parameters:
gui (
Gtk.Builder
) – theGtk.Builder
widget_name (
str
) – the name of the combo box in the ui file.
- Returns:
the
Gtk.ComboBox
orNone
- Return type:
searches the
Gtk.ComboBox
in gui and ensures it has a model and a renderer appropriate for using with #gtk_combo_box_append_text and friends.
- GOffice.gtk_builder_get_widget(gui, widget_name)¶
- Parameters:
gui (
Gtk.Builder
) – theGtk.Builder
widget_name (
str
) – the name of the combo box in the ui file.
- Returns:
a new
Gtk.Widget
orNone
- Return type:
Simple wrapper to
Gtk.Builder.get_object
which returns the object as aGtk.Widget
.
- GOffice.gtk_builder_group_value(gui, group)¶
- Parameters:
gui (
Gtk.Builder
) –group (
str
) –
- Return type:
- GOffice.gtk_builder_load(uifile, domain, gcc)¶
- Parameters:
uifile (
str
) – the name of the file loaddomain (
str
) – the translation domaingcc (
GOffice.CmdContext
) –GOffice.CmdContext
- Returns:
a new
Gtk.Builder
orNone
uifile should be one of these:
res:NAME – data from resource manager data:DATA – data right here filename – data from local file
Data may be compressed, regardless of source.
- Return type:
Simple utility to open ui files
New in version 0.9.6.
- GOffice.gtk_builder_load_internal(uifile, domain, gcc)¶
- Parameters:
uifile (
str
) – the name of the file loaddomain (
str
) – the translation domaingcc (
GOffice.CmdContext
) –GOffice.CmdContext
- Returns:
a new
Gtk.Builder
orNone
Variant of go_gtk_builder_new that searchs goffice directories for files. uifile should be one of these:
res:NAME – data from resource manager data:DATA – data right here filename – data from local file
Data may be compressed, regardless of source.
- Return type:
Simple utility to open ui files
New in version 0.9.6.
- GOffice.gtk_builder_signal_connect(gui, instance_name, detailed_signal, c_handler, *data)¶
- Parameters:
gui (
Gtk.Builder
) –Gtk.Builder
instance_name (
str
) – widget namedetailed_signal (
str
) – signal namec_handler (
GObject.Callback
) –GObject.Callback
- Returns:
The signal id
- Return type:
Convenience wrapper around g_signal_connect for
Gtk.Builder
.
- GOffice.gtk_builder_signal_connect_swapped(gui, instance_name, detailed_signal, c_handler, *data)¶
- Parameters:
gui (
Gtk.Builder
) –Gtk.Builder
instance_name (
str
) – widget namedetailed_signal (
str
) – signal namec_handler (
GObject.Callback
) –GObject.Callback
- Returns:
The signal id
- Return type:
Convenience wrapper around g_signal_connect_swapped for
Gtk.Builder
.
- GOffice.gtk_button_build_with_stock(text, stock_id)¶
- Parameters:
- Returns:
newly created button
- Return type:
FROM : gedit Creates a new
Gtk.Button
with custom label and stock image.New in version 0.9.9.
- GOffice.gtk_combo_box_append_text(combo, str)¶
- Parameters:
combo (
Gtk.ComboBox
) –str (
str
) –
- GOffice.gtk_combo_box_remove_text(combo, position)¶
- Parameters:
combo (
Gtk.ComboBox
) –position (
int
) –
- GOffice.gtk_dialog_add_button(dialog, text, stock_id, response_id)¶
- Parameters:
dialog (
Gtk.Dialog
) – dialog you want to add a buttontext (
str
) – button labelstock_id (
str
) – stock icon idresponse_id (
int
) – respond id when button clicked
- Returns:
newly created button
- Return type:
FROM : gedit Creates and adds a button with stock image to the action area of an existing dialog.
- GOffice.gtk_dialog_run(dialog, parent)¶
- Parameters:
dialog (
Gtk.Dialog
) –Gtk.Dialog
parent (
Gtk.Window
) –Gtk.Window
- Returns:
result ID.
- Return type:
Pop up a dialog as child of a window.
- GOffice.gtk_editable_enters(window, w)¶
- Parameters:
window (
Gtk.Window
) –Gtk.Window
w (
Gtk.Widget
) –Gtk.Widget
Normally if there’s an editable widget (such as
Gtk.Entry
) in your dialog, pressing Enter will activate the editable rather than the default dialog button. However, in most cases, the user expects to type something in and then press enter to close the dialog. This function enables that behavior.
- GOffice.gtk_file_sel_dialog(toplevel, w)¶
- Parameters:
toplevel (
Gtk.Window
) –Gtk.Window
w (
Gtk.Widget
) –Gtk.Widget
- Returns:
True
if a file was selected.- Return type:
Runs a modal dialog to select a file.
- GOffice.gtk_help_button_init(w, data_dir, app, link)¶
- Parameters:
w (
Gtk.Widget
) –data_dir (
str
) –app (
str
) –link (
str
) –
- GOffice.gtk_nonmodal_dialog(toplevel, dialog)¶
- Parameters:
toplevel (
Gtk.Window
) –Gtk.Window
dialog (
Gtk.Window
) –Gtk.Window
Utility to set dialog as a transient of toplevel and to set up a handler for “Escape”
- GOffice.gtk_select_image(toplevel, initial)¶
- Parameters:
toplevel (
Gtk.Window
) –initial (
str
) –
- Return type:
- GOffice.gtk_select_image_with_extra_widget(toplevel, initial, extra)¶
- Parameters:
toplevel (
Gtk.Window
) –initial (
str
) –extra (
Gtk.Widget
) –
- Return type:
- GOffice.gtk_url_is_writeable(parent, uri, overwrite_by_default)¶
- Parameters:
parent (
Gtk.Window
) –Gtk.Window
uri (
str
) – the uri to test.
- Returns:
True
if url is writable- Return type:
Check if it makes sense to try saving. If it’s an existing file and writable for us, ask if we want to overwrite. We check for other problems, but if we miss any, the saver will report. So it doesn’t have to be bulletproof.
FIXME: The message boxes should really be children of the file selector, not the
GOffice.workbook
.
- GOffice.gtk_url_show(url, screen)¶
- Parameters:
url (
str
) – the url to showscreen (
Gdk.Screen
) – screen to show the uri on orNone
for the default screen
- Returns:
None
on sucess, or a newly allocatedGLib.Error
if something went wrong.- Return type:
This function is a simple convenience wrapper for
Gtk.show_uri
.
- GOffice.gtk_widget_disable_focus(w)¶
- Parameters:
w (
Gtk.Widget
) –Gtk.Widget
Convenience wrapper to disable focus on a container and it’s children.
- GOffice.gtk_widget_render_icon_pixbuf(widget, icon_name, size)¶
- Parameters:
widget (
Gtk.Widget
) – a mapped widget determining the screen targetedicon_name (
str
) – the name of the icon to rendersize (
Gtk.IconSize
) – the symbolic size desired.
- Returns:
- Return type:
This function works as
Gtk.Widget.render_icon_pixbuf
except that it takes an icon name, not a stock id.
- GOffice.gtk_widget_replace(victim, replacement)¶
- Parameters:
victim (
Gtk.Widget
) –replacement (
Gtk.Widget
) –
- GOffice.gtk_window_set_transient(toplevel, window)¶
- Parameters:
toplevel (
Gtk.Window
) – The calling windowwindow (
Gtk.Window
) – the transient window
Make the window a child of the
GOffice.workbook
in the command context, if there is one. The function duplicates the positioning functionality in gnome_dialog_set_parent, but does not require the transient window to be a GnomeDialog.
- GOffice.guess_encoding(raw, len, user_guess, utf8_str, truncated)¶
- GOffice.gui_get_image_save_info(toplevel, supported_formats, ret_format, resolution)¶
- Parameters:
toplevel (
Gtk.Window
) – aGtk.Window
supported_formats ([
object
]) – aGLib.SList
of supported file formatsret_format (
GOffice.ImageFormat
) – default file formatresolution (
float
) – export resolution
- Returns:
file URI string, file
GOffice.ImageFormat
stored in ret_format, and export resolution in resolution.- Return type:
Opens a file chooser and lets user choose file URI and format in a list of supported ones.
- GOffice.hash_keys(hash)¶
- Parameters:
hash ({
object
:object
}) –GLib.HashTable
- Returns:
a list which the caller needs to free. The content has not additional references added
Note: consider using g_hash_table_get_keys instead.
- Return type:
[
object
]
Collects an unordered list of the keys in hash.
- GOffice.init()¶
Initialize GOffice.
This function can be called several times; each call will increment a reference counter. Code that calls this function should call
GOffice.shutdown
() when done to decrement the counter.
- GOffice.io_count_progress_set(io_context, total, step)¶
- Parameters:
io_context (
GOffice.IOContext
) –total (
int
) –step (
int
) –
- GOffice.io_count_progress_update(io_context, inc)¶
- Parameters:
io_context (
GOffice.IOContext
) –inc (
int
) –
- GOffice.io_error_clear(ioc)¶
- Parameters:
ioc (
GOffice.IOContext
) –
- GOffice.io_error_display(ioc)¶
- Parameters:
ioc (
GOffice.IOContext
) –
- GOffice.io_error_info_set(ioc, error)¶
- Parameters:
ioc (
GOffice.IOContext
) –error (
GOffice.ErrorInfo
) –
- GOffice.io_error_occurred(ioc)¶
- Parameters:
ioc (
GOffice.IOContext
) –- Return type:
- GOffice.io_error_push(ioc, error)¶
- Parameters:
ioc (
GOffice.IOContext
) –error (
GOffice.ErrorInfo
) –
- GOffice.io_error_string(ioc, str)¶
- Parameters:
ioc (
GOffice.IOContext
) –str (
str
) –
- GOffice.io_error_unknown(ioc)¶
- Parameters:
ioc (
GOffice.IOContext
) –
- GOffice.io_progress_message(io_context, msg)¶
- Parameters:
io_context (
GOffice.IOContext
) –msg (
str
) –
- GOffice.io_progress_range_pop(io_context)¶
- Parameters:
io_context (
GOffice.IOContext
) –
- GOffice.io_progress_range_push(io_context, min, max)¶
- Parameters:
io_context (
GOffice.IOContext
) –min (
float
) –max (
float
) –
- GOffice.io_progress_unset(io_context)¶
- Parameters:
io_context (
GOffice.IOContext
) –
- GOffice.io_progress_update(io_context, f)¶
- Parameters:
io_context (
GOffice.IOContext
) –f (
float
) –
- GOffice.io_value_progress_set(io_context, total, step)¶
- Parameters:
io_context (
GOffice.IOContext
) –total (
int
) –step (
int
) –
- GOffice.io_value_progress_update(io_context, value)¶
- Parameters:
io_context (
GOffice.IOContext
) –value (
int
) –
- GOffice.io_warning_occurred(ioc)¶
- Parameters:
ioc (
GOffice.IOContext
) –- Return type:
- GOffice.io_warning_unknown_font(ioc, font_name)¶
- Parameters:
ioc (
GOffice.IOContext
) –font_name (
str
) –
- GOffice.io_warning_unknown_function(ioc, funct_name)¶
- Parameters:
ioc (
GOffice.IOContext
) –funct_name (
str
) –
- GOffice.io_warning_unsupported_feature(ioc, feature)¶
- Parameters:
ioc (
GOffice.IOContext
) –feature (
str
) –
- GOffice.line_dash_as_label(type)¶
- Parameters:
type (
GOffice.LineDashType
) – aGOffice.LineDashType
- Returns:
user readable name of the dash type, or the name of
GOffice.LineDashType.NONE
if type is invalid.- Return type:
- GOffice.line_dash_as_str(type)¶
- Parameters:
type (
GOffice.LineDashType
) – aGOffice.LineDashType
- Returns:
nickname of the dash type, or “none” if type is invalid.
- Return type:
- GOffice.line_dash_from_str(name)¶
- Parameters:
name (
str
) – Name of the dash type- Returns:
a
GOffice.LineDashType
corresponding to name, orGOffice.LineDashType.NONE
if not found.- Return type:
- GOffice.line_dash_get_length(type)¶
- Parameters:
type (
GOffice.LineDashType
) –GOffice.LineDashType
- Returns:
the unscaled length of the dash sequence.
- Return type:
- GOffice.line_dash_get_sequence(type, scale)¶
- Parameters:
type (
GOffice.LineDashType
) – aGOffice.LineDashType
scale (
float
) – dash scale
- Returns:
a struct containing the dash sequence corresponding to type, or
None
if type is invalid or equal toGOffice.LineDashType.NONE
. The lengths are scaled according to scale.- Return type:
- GOffice.line_interpolation_as_label(type)¶
- Parameters:
type (
GOffice.LineInterpolation
) – an interpolation type- Returns:
label of type, or the name of
GOffice.LineInterpolation.LINEAR
if type is invalid.- Return type:
- GOffice.line_interpolation_as_str(type)¶
- Parameters:
type (
GOffice.LineInterpolation
) – an interpolation type- Returns:
nickname of type, or “linear” if type is invalid.
- Return type:
- GOffice.line_interpolation_auto_skip(type)¶
- Parameters:
type (
GOffice.LineInterpolation
) – an interpolation type- Returns:
True
if the line interpolation type forces skipping invalid data,False
if it is only optional.- Return type:
- GOffice.line_interpolation_from_str(name)¶
- Parameters:
name (
str
) – an interpolation type nickname- Returns:
a
GOffice.LineInterpolation
corresponding to name, orGOffice.LineInterpolation.LINEAR
if not found.- Return type:
- GOffice.line_interpolation_supports_radial(type)¶
- Parameters:
type (
GOffice.LineInterpolation
) – an interpolation type- Returns:
True
if the line interpolation type can be used with radial axes set,False
if it cannot.- Return type:
- GOffice.linear_regression(xss, dim, ys, n, affine)¶
- Parameters:
- Returns:
GOffice.RegressionResult
as above.- res:
place for constant[0] and slope1[1], slope2[2],… There will be dim+1 results.
- stat_:
storage for additional results.
- Return type:
(
GOffice.RegressionResult
, res:float
, stat_:GOffice.go_regression_stat_t
)
Performs multi-dimensional linear regressions on the input points. Fits to “y = b + a1 * x1 + … ad * xd”.
- GOffice.linear_regression_leverage(A, d, m, n)¶
- Parameters:
- Return type:
- GOffice.linear_solve(A, b, n, res)¶
- Parameters:
- Return type:
- GOffice.linear_solve_multiple(A, B, n, bn)¶
- Parameters:
- Return type:
- GOffice.list_index_custom(list, data, cmp_func)¶
- Parameters:
data (
object
orNone
) – element for which the index is searched forcmp_func (
GLib.CompareFunc
) –GLib.CompareFunc
- Returns:
the data index in the list.
- Return type:
Searched for data in list and return the corresponding index or -1 if not found.
- GOffice.load_pango_attributes_into_buffer(markup, buffer, str)¶
- Parameters:
markup (
Pango.AttrList
) –buffer (
Gtk.TextBuffer
) –str (
str
) –
- GOffice.locale_24h()¶
- GOffice.locale_boolean_name(b)¶
- GOffice.locale_get_currency(precedes, space_sep)¶
- Parameters:
- Returns:
A string with the default currency
- Return type:
Play with the default logic so that things come out nicely for the default case.
- GOffice.locale_get_date_format()¶
- Returns:
Current locale’s date format as a string.
- Return type:
- GOffice.locale_get_decimal()¶
- Returns:
Current locale’s decimal separator.
- Return type:
- GOffice.locale_get_thousand()¶
- Returns:
Current locale’s thousands separator. This may be an empty string.
- Return type:
- GOffice.locale_get_time_format()¶
- Returns:
Current locale’s time format as a string.
- Return type:
- GOffice.locale_untranslated_booleans()¶
Short circuit the current locale so that we can import files and still produce error messages in the current LC_MESSAGE
- GOffice.logarithmic_fit(xs, ys, n, res)¶
- Parameters:
- Returns:
GOffice.RegressionResult
as above.- Return type:
Performs a two-dimensional non-linear fitting on the input points. Fits to “y = a + b * ln (sign * (x - c))”, with sign in {-1, +1}. The graph is a logarithmic curve moved horizontally by c and possibly mirrored across the y-axis (if sign = -1).
Fits c (and sign) by iterative trials, but seems to be fast enough even for automatic recomputation.
Adapts c until a local minimum of squared residuals is reached. For each new c tried out the corresponding a and b are calculated by linear regression. If no local minimum is found, an error is returned. If there is more than one local minimum, the one found is not necessarily the smallest (i.e., there might be cases in which the returned fit is not the best possible). If the shape of the point cloud is to different from ``logarithmic’’, either sign can not be determined (error returned) or no local minimum will be found.
(Requires: at least 3 different x values, at least 3 different y values.)
- GOffice.logarithmic_regression(xss, dim, ys, n, affine, res)¶
- Parameters:
- Returns:
GOffice.RegressionResult
as above.- stat_:
storage for additional results.
- Return type:
(
GOffice.RegressionResult
, stat_:GOffice.go_regression_stat_t
)
This is almost a copy of linear_regression and produces multi-dimensional linear regressions on the input points after transforming xss to ln(xss). Fits to “y = b + a1 * z1 + … ad * zd” with “zi = ln (xi)”. Problems with arrays in the calling function: see comment to gnumeric_linest, which is also valid for gnumeric_logreg.
(Errors: less than two points, all points on a vertical line, non-positive x data.)
- GOffice.mathml_to_itex(mml, buf, length, compact, gcc)¶
- GOffice.matrix_pseudo_inverse(A, m, n, threshold, B)¶
- GOffice.memdup(mem, byte_size)¶
- Parameters:
- Return type:
Like
GLib.memdup
orGLib.memdup2
. This function is meant to ease transition toGLib.memdup2
without having to require very new glib.
- GOffice.memdup_n(mem, n_blocks, block_size)¶
- Parameters:
- Return type:
Like
GOffice.memdup
(mem, n_blocks * block_size), but with overflow check. Like a potential future g_memdup_n.
- Parameters:
Implementation of a
Gtk.MenuPositionFunc
that positions the child window under the parent one, for use withGtk.Menu.popup
.
- GOffice.mime_to_image_format(mime_type)¶
- GOffice.mime_type_get_description(mime_type)¶
- GOffice.non_linear_regression(f, xvals, par, yvals, sigmas, x_dim, p_dim, chi, errors)¶
- Parameters:
f (
GOffice.RegressionFunction
) – the model functionxvals (
float
) – independent values.par (
float
) – model parameters.yvals (
float
) – dependent values.sigmas (
float
) – stahdard deviations for the dependent values.x_dim (
int
) – Number of data points.p_dim (
int
) – Number of parameters.chi (
float
) – Chi Squared of the final result. ThisGOffice.value
is not very meaningful without the sigmas.errors (
float
) – MUST ALREADY BE ALLOCATED. These are the approximated standard deviation for each parameter.
- Returns:
the results of the non-linear regression from the given initial values. The resulting parameters are placed back into par.
- Return type:
SYNOPSIS: result = non_linear_regression (f, xvals, par, yvals, sigmas, x_dim, p_dim, &chi, errors) Non linear regression.
- GOffice.object_properties_apply(obj, props, changed_only)¶
- Parameters:
obj (
GObject.Object
) –GObject.Object
props ([
object
]) – the list of properties and their values to applychanged_only (
bool
) – whether to restrict calls toGObject.Object.set_property
() to properties with changed values.
Sets a list of properties for obj. The list needs to be a list of alternating
GObject.ParamSpec
andGObject.Value
.
- GOffice.object_properties_collect(obj)¶
- Parameters:
obj (
GObject.Object
) –GObject.Object
- Returns:
the list of collected properties as
GObject.ParamSpec
and values asGObject.Value
.- Return type:
[
object
]
Collect all rw properties and their values.
- GOffice.object_properties_free(props)¶
- Parameters:
props ([
object
]) – the list of properties and their values to unset
Unsets the values in the list which needs to be a list of alternating
GObject.ParamSpec
andGObject.Value
.
- GOffice.object_set_property(obj, property_name, user_prop_name, value, err, error_template)¶
- Parameters:
obj (
GObject.Object
) –property_name (
str
) –user_prop_name (
str
) –value (
str
) –err (
GLib.Error
) –error_template (
str
) –
- Return type:
- GOffice.object_toggle(object, property_name)¶
- Parameters:
object (
object
orNone
) –GObject.Object
property_name (
str
) – name
Toggle a boolean object property.
- GOffice.pango_attr_list_erase(attrs, pos, len)¶
- Parameters:
attrs (
Pango.AttrList
) – An attribute listpos (
int
) – a text position in byteslen (
int
) – length of segment in bytes
This function erases a segment of attributes. This is what to call after deleting a segment from the text described by the attributes.
- GOffice.pango_attr_list_is_empty(attrs)¶
- Parameters:
attrs (
Pango.AttrList
) –- Return type:
- GOffice.pango_attr_list_open_hole(tape, pos, len)¶
- Parameters:
tape (
Pango.AttrList
) – An attribute listpos (
int
) – a text position in byteslen (
int
) – length of segment in bytes
This function opens up a blank segment of attributes. This is what to call after inserting a segment into the text described by the attributes.
- GOffice.pango_attr_list_unset(list, start, end, type)¶
- Parameters:
list (
Pango.AttrList
) –Pango.AttrList
start (
int
) – starting character indexend (
int
) – last character indextype (
Pango.AttrType
) –Pango.AttrType
See http://bugzilla.gnome.org/show_bug.cgi?id=163679
- GOffice.pango_attr_subscript_get_attr_type()¶
- Return type:
- GOffice.pango_attr_superscript_get_attr_type()¶
- Return type:
- GOffice.pango_attrs_to_markup(attrs, text)¶
- Parameters:
attrs (
Pango.AttrList
) –text (
str
) –
- Return type:
- GOffice.pango_measure_string(context, font_desc, str)¶
- Parameters:
context (
Pango.Context
) –Pango.Context
font_desc (
Pango.FontDescription
) –Pango.FontDescription
str (
str
) – The text to measure.
- Returns:
the pixel length of str according to context.
- Return type:
A utility function to measure text.
- GOffice.pango_translate_attributes(attrs)¶
- Parameters:
attrs (
Pango.AttrList
) –- Return type:
- GOffice.pango_translate_layout(layout)¶
- Parameters:
layout (
Pango.Layout
) –
- GOffice.parse_key_value(options, err, handler, user)¶
- Parameters:
options (
str
) – Options string.err (
GLib.Error
) – Reference to storeGLib.Error
if parsing fails.handler (
GOffice.ParseKeyValueFunc
) – Handler to call for each key-GOffice.value
pair.
- Return type:
- GOffice.pattern_as_str(pattern)¶
- Parameters:
pattern (
GOffice.PatternType
) –- Return type:
- GOffice.pattern_selector_new(initial_type, default_type)¶
- Parameters:
initial_type (
GOffice.PatternType
) – pattern type initially selecteddefault_type (
GOffice.PatternType
) – automatic pattern type
- Returns:
a new
Gtk.Widget
.- Return type:
Creates a new pattern selector.
- GOffice.pattern_selector_set_colors(selector, foreground, background)¶
- Parameters:
selector (
GOffice.Selector
) – a patternGOffice.Selector
foreground (
int
) – foreground colorbackground (
int
) – background color
Updates swatch colors of selector.
- GOffice.pcauchy(x, location, scale, lower_tail, log_p)¶
- GOffice.plnorm(x, logmean, logsd, lower_tail, log_p)¶
- GOffice.plugins_get_available_plugins()¶
- Returns:
the list of available plugins. The returned
GOffice.value
must not be freed and stays valid until calling plugins_rescan or plugins_shutdown.- Return type:
- GOffice.plugins_get_plugin_by_id(plugin_id)¶
- Parameters:
plugin_id (
str
) – String containing plugin ID- Returns:
GOffice.Plugin
object for plugin with ID equal to plugin_id orNone
if there’s no plugin available with given id. Function returns “borrowed” reference, useGObject.Object.ref
if you want to be sure that plugin won’t disappear.- Return type:
- GOffice.plugins_init(context, known_states, active_plugins, plugin_dirs, activate_new_plugins, default_loader_type)¶
- Parameters:
context (
GOffice.CmdContext
orNone
) –GOffice.CmdContext
used to report errorsknown_states ([
str
] orNone
) – A list of known states (defined how ?)plugin_dirs ([
str
] orNone
) – a list of directories to search for pluginsactivate_new_plugins (
bool
) – activate plugins we have no seen before.default_loader_type (
GObject.GType
) – importer to use by default.
Initializes the plugin subsystem. Might be called several times to add new plugins.
- GOffice.plugins_register_loader(id_str, service)¶
- Parameters:
id_str (
str
) – Loader’s idservice (
GOffice.PluginService
) – Plugin service of type “plugin_loader”
Registers new type of plugin loader identified by loader_id (identifier consists of loader’s plugin ID and service ID concatenated using colon). All requests to create new loader object of this type will be passed to service.
This function is intended for use by
GOffice.PluginService
objects.
- GOffice.plugins_rescan(ret_error, ret_new_plugins)¶
- Parameters:
ret_error (
GOffice.ErrorInfo
) – Pointer used to report errorsret_new_plugins ([
GOffice.Plugin
]) – Optional pointer to return list of new plugins
- GOffice.plugins_shutdown()¶
- Returns:
the list of plugins still in use.
- Return type:
[
str
]
Shuts down the plugin subsystem. Call this function only once before exiting the application. Some plugins may be left active or in broken state, so calling plugins_init again will NOT work properly.
- GOffice.plugins_unregister_loader(id_str)¶
- Parameters:
id_str (
str
) – Loader’s id
Unregisters a type of plugin loader identified by loader_id. After callingthis function Gnumeric will be unable to load plugins supported by the specified loader.
This function is intended for use by
GOffice.PluginService
objects.
- GOffice.pnorm(x, mu, sigma, lower_tail, log_p)¶
- GOffice.pnorm_both(x, cum, ccum, i_tail, log_p)¶
- GOffice.pow10(n)¶
-
Computes 10 to the power of n. This is fast and accurate (under the reasonable assumption that the compiler is accurate).
- GOffice.pow2(n)¶
-
Computes 2 to the power of n. This is fast and accurate.
- GOffice.power_regression(xss, dim, ys, n, affine, res)¶
- Parameters:
- Returns:
GOffice.RegressionResult
as above.- stat_:
storage for additional results.
- Return type:
(
GOffice.RegressionResult
, stat_:GOffice.go_regression_stat_t
)
Performs one-dimensional linear regressions on the input points. Fits to “y = b * x1^m1 * … * xd^md “ or equivalently to “log y = log b + m1 * log x1 + … + md * log xd”.
- GOffice.pweibull(x, shape, scale, lower_tail, log_p)¶
- GOffice.qcauchy(p, location, scale, lower_tail, log_p)¶
- GOffice.qlnorm(p, logmean, logsd, lower_tail, log_p)¶
- GOffice.qnorm(p, mu, sigma, lower_tail, log_p)¶
- GOffice.quad_abs(a)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function computes the absolute
GOffice.value
of a, storing the result in res.
- GOffice.quad_absl(a)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function computes the absolute
GOffice.value
of a, storing the result in res.
- GOffice.quad_acos(a)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function computes the arc cosine of a, storing the result in res.
- GOffice.quad_acosl(a)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function computes the arc cosine of a, storing the result in res.
- GOffice.quad_add(a, b)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
b (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function adds a and b, storing the result in res.
- GOffice.quad_addl(a, b)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
b (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function adds a and b, storing the result in res.
- GOffice.quad_asin(a)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function computes the arc sine of a, storing the result in res.
- GOffice.quad_asinl(a)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function computes the arc sine of a, storing the result in res.
- GOffice.quad_atan2(y, x)¶
- Parameters:
y (
GOffice.Quad
) – quad-precisionGOffice.value
x (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function computes polar angle coordinate of the point (x,`y`), storing the result in res.
- GOffice.quad_atan2l(y, x)¶
- Parameters:
y (
GOffice.Quadl
) – quad-precisionGOffice.value
x (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function computes polar angle coordinate of the point (x,`y`), storing the result in res.
- GOffice.quad_atan2pi(y, x)¶
- Parameters:
y (
GOffice.Quad
) – quad-precisionGOffice.value
x (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function computes polar angle coordinate of the point (x,`y`) divided by pi, storing the result in res.
- GOffice.quad_atan2pil(y, x)¶
- Parameters:
y (
GOffice.Quadl
) – quad-precisionGOffice.value
x (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function computes polar angle coordinate of the point (x,`y`) divided by pi, storing the result in res.
- GOffice.quad_constant8(data, base, scale)¶
- Parameters:
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function interprets a vector of digits in a given base as a quad-precision
GOffice.value
. It is mostly meant for internal use.
- GOffice.quad_cos(a)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function computes the cosine of a, storing the result in res.
- GOffice.quad_cosl(a)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function computes the cosine of a, storing the result in res.
- GOffice.quad_cospi(a)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function computes the cosine of a times pi, storing the result in res. This is more accurate than actually doing the multiplication.
- GOffice.quad_cospil(a)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function computes the cosine of a times pi, storing the result in res. This is more accurate than actually doing the multiplication.
- GOffice.quad_div(a, b)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
b (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function divides a and b, storing the result in res.
- GOffice.quad_divl(a, b)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
b (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function divides a and b, storing the result in res.
- GOffice.quad_dot_product(a, b)¶
- Parameters:
a ([
GOffice.Quad
]) – vector of quad-precision valuesb ([
GOffice.Quad
]) – vector of quad-precision values
- Returns:
result location
- Return type:
res:
GOffice.Quad
- GOffice.quad_dot_productl(a, b)¶
- Parameters:
a ([
GOffice.Quadl
]) – vector of quad-precision valuesb ([
GOffice.Quadl
]) – vector of quad-precision values
- Returns:
result location
- Return type:
res:
GOffice.Quadl
- GOffice.quad_end(state)¶
- Parameters:
state (
object
orNone
) – state pointer fromGOffice.Quad.start
.
This ends a section of quad precision arithmetic.
- GOffice.quad_endl(state)¶
- Parameters:
state (
object
orNone
) – state pointer fromGOffice.Quad.start
.
This ends a section of quad precision arithmetic.
- GOffice.quad_exp(a)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
- res:
result location
- expb:
(allow-none): power-of-base result scaling location
- Return type:
(res:
GOffice.Quad
, expb:float
)
This function computes the exponential function at a, storing the result in res. If the optional expb is supplied, it is used to return a power of radix by which the result should be scaled. This is useful to represent results much, much bigger than double precision can handle.
- GOffice.quad_expm1(a)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function computes the exponential function at a with 1 subtracted, storing the difference in res.
- GOffice.quad_expm1l(a)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function computes the exponential function at a with 1 subtracted, storing the difference in res.
- GOffice.quad_floor(a)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function takes the floor of a, storing the result in res.
- GOffice.quad_floorl(a)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function takes the floor of a, storing the result in res.
- GOffice.quad_hypot(a, b)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
b (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function computes the square root of a^2 plus b^2, storing the result in res.
- GOffice.quad_hypotl(a, b)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
b (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function computes the square root of a^2 plus b^2, storing the result in res.
- GOffice.quad_init(h)¶
- Parameters:
h (
float
) – a double precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This stores the
GOffice.value
h in res. As an exception, this may be called outsideGOffice.Quad.start
andGOffice.Quad.end
sections.
- GOffice.quad_log(a)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function computes the natural logarithm at a, storing the result in res.
- GOffice.quad_logl(a)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function computes the natural logarithm at a, storing the result in res.
- GOffice.quad_matrix_back_solvel(R, b, allow_degenerate)¶
- Parameters:
R (
GOffice.QuadMatrixl
) – An upper triangular matrix.b (
GOffice.Quadl
) – Input vector.allow_degenerate (
bool
) – IfTrue
, then degenerate dimensions are ignored other than being given a zero result. A degenerate dimension is one whose diagonal entry is zero.
- Returns:
True
on error.This function solves the triangular system R*x=b.
- x:
Result vector.
- Return type:
(
bool
, x:GOffice.Quadl
)
- GOffice.quad_matrix_copy(B)¶
- Parameters:
B (
GOffice.QuadMatrix
) – Source matrix.- Returns:
Destination matrix.
- Return type:
Copies B to A.
- GOffice.quad_matrix_copyl(B)¶
- Parameters:
B (
GOffice.QuadMatrixl
) – Source matrix.- Returns:
Destination matrix.
- Return type:
Copies B to A.
- GOffice.quad_matrix_determinantl(A, res)¶
- Parameters:
A (
GOffice.QuadMatrixl
) –res (
GOffice.Quadl
) –
- GOffice.quad_matrix_dumpl(A, fmt)¶
- Parameters:
A (
GOffice.QuadMatrixl
) –fmt (
str
) –
- GOffice.quad_matrix_freel(A)¶
- Parameters:
A (
GOffice.QuadMatrixl
) –
- GOffice.quad_matrix_fwd_solvel(R, b, allow_degenerate)¶
- Parameters:
R (
GOffice.QuadMatrixl
) – An upper triangular matrix.b (
GOffice.Quadl
) – Input vector.allow_degenerate (
bool
) – IfTrue
, then degenerate dimensions are ignored other than being given a zero result. A degenerate dimension is one whose diagonal entry is zero.
- Returns:
True
on error.This function solves the triangular system RT*x=b.
- x:
Result vector.
- Return type:
(
bool
, x:GOffice.Quadl
)
- GOffice.quad_matrix_multiply(A, B)¶
- Parameters:
A (
GOffice.QuadMatrix
) – Source matrix.B (
GOffice.QuadMatrix
) – Source matrix.
- Returns:
Destination matrix.
- Return type:
Multiplies A*B and stores the result in C.
- GOffice.quad_matrix_multiplyl(A, B)¶
- Parameters:
A (
GOffice.QuadMatrixl
) – Source matrix.B (
GOffice.QuadMatrixl
) – Source matrix.
- Returns:
Destination matrix.
- Return type:
Multiplies A*B and stores the result in C.
- GOffice.quad_matrix_transpose(B)¶
- Parameters:
B (
GOffice.QuadMatrix
) – Source matrix.- Returns:
Destination matrix.
- Return type:
Transposes B into A.
- GOffice.quad_matrix_transposel(B)¶
- Parameters:
B (
GOffice.QuadMatrixl
) – Source matrix.- Returns:
Destination matrix.
- Return type:
Transposes B into A.
- GOffice.quad_mul(a, b)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
b (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function multiplies a and b, storing the result in res.
- GOffice.quad_mul12(x, y)¶
- Parameters:
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function multiplies x and y, storing the result in res with full quad precision.
- GOffice.quad_mull(a, b)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
b (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function multiplies a and b, storing the result in res.
- GOffice.quad_negate(a)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function negates a and stores the result in res.
- GOffice.quad_negatel(a)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function negates a and stores the result in res.
- GOffice.quad_pow(x, y)¶
- Parameters:
x (
GOffice.Quad
) – quad-precisionGOffice.value
y (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
- res:
result location
- expb:
(allow-none): power-of-base result scaling location
- Return type:
(res:
GOffice.Quad
, expb:float
)
This function computes x to the power of y, storing the result in res. If the optional expb is supplied, it is used to return a power of radix by which the result should be scaled. Such scaling can be done with the scalbn function, typically after combining multiple such terms. This is useful to represent results much, much bigger than double precision can handle.
- GOffice.quad_qr_determinantl(qr, det)¶
- Parameters:
qr (
GOffice.QuadQRl
) –det (
GOffice.Quadl
) –
- GOffice.quad_qr_freel(qr)¶
- Parameters:
qr (
GOffice.QuadQRl
) –
- GOffice.quad_qr_multiply_qtl(qr, x)¶
- Parameters:
qr (
GOffice.QuadQRl
) – A QR decomposition.x (
GOffice.Quadl
) – a vector.
- Returns:
a vector.
- Return type:
Replaces x by Q^t * x
- GOffice.quad_qr_rl(qr)¶
- Parameters:
qr (
GOffice.QuadQRl
) – A QR decomposition.- Returns:
the small R from the decomposition, i.e., a square matrix of size n. To get the large R, if needed, add m-n zero rows.
- Return type:
- GOffice.quad_scalbnl(res, a, n)¶
- Parameters:
res (
GOffice.Quadl
) –a (
GOffice.Quadl
) –n (
int
) –
- GOffice.quad_sin(a)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function computes the sine of a, storing the result in res.
- GOffice.quad_sinl(a)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function computes the sine of a, storing the result in res.
- GOffice.quad_sinpi(a)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function computes the sine of a times pi, storing the result in res. This is more accurate than actually doing the multiplication.
- GOffice.quad_sinpil(a)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function computes the sine of a times pi, storing the result in res. This is more accurate than actually doing the multiplication.
- GOffice.quad_sqrt(a)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function takes the square root of a, storing the result in res.
- GOffice.quad_sqrtl(a)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function takes the square root of a, storing the result in res.
- GOffice.quad_start()¶
- Returns:
a pointer to pass to
GOffice.Quad.end
() when done.- Return type:
Initializes
GOffice.Quad
arithmetic. Any use ofGOffice.Quad
must occur between calls toGOffice.Quad.start
() andGOffice.Quad.end
().
- GOffice.quad_startl()¶
- Returns:
a pointer to pass to
GOffice.Quad.end
() when done.- Return type:
Initializes
GOffice.Quad
arithmetic. Any use ofGOffice.Quad
must occur between calls toGOffice.Quad.startl
() andGOffice.Quad.end
().
- GOffice.quad_sub(a, b)¶
- Parameters:
a (
GOffice.Quad
) – quad-precisionGOffice.value
b (
GOffice.Quad
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quad
This function subtracts a and b, storing the result in res.
- GOffice.quad_subl(a, b)¶
- Parameters:
a (
GOffice.Quadl
) – quad-precisionGOffice.value
b (
GOffice.Quadl
) – quad-precisionGOffice.value
- Returns:
result location
- Return type:
res:
GOffice.Quadl
This function subtracts a and b, storing the result in res.
- GOffice.qweibull(p, shape, scale, lower_tail, log_p)¶
- GOffice.range_average(xs)¶
- GOffice.range_constant(xs)¶
- GOffice.range_decreasing(xs)¶
- GOffice.range_devsq(xs)¶
- GOffice.range_fractile_inter(xs, f)¶
- GOffice.range_fractile_inter_nonconst(xs, n, res, f)¶
- GOffice.range_fractile_inter_sorted(xs, f)¶
- GOffice.range_increasing(xs)¶
- GOffice.range_max(xs)¶
- GOffice.range_maxabs(xs)¶
- GOffice.range_median_inter(xs)¶
- GOffice.range_median_inter_nonconst(xs, n, res)¶
- GOffice.range_median_inter_sorted(xs)¶
- GOffice.range_min(xs)¶
- GOffice.range_sum(xs)¶
- GOffice.range_sumsq(xs)¶
- GOffice.range_vary_uniformly(xs)¶
- GOffice.regcomp(preg, pattern, cflags)¶
- Parameters:
preg (
GOffice.Regexp
) –pattern (
str
) –cflags (
int
) –
- Return type:
- GOffice.regerror(errcode, preg, errbuf, errbuf_size)¶
- Parameters:
errcode (
int
) –preg (
GOffice.Regexp
) –errbuf (
str
) –errbuf_size (
int
) –
- Return type:
- GOffice.regexec(preg, string, nmatch, pmatch, eflags)¶
- Parameters:
preg (
GOffice.Regexp
) –string (
str
) –nmatch (
int
) –pmatch (
GOffice.Regmatch
) –eflags (
int
) –
- Return type:
- GOffice.regexp_quote(target, s)¶
- Parameters:
target (
GLib.String
) –s (
str
) –
- GOffice.regexp_quote1(target, s)¶
- Parameters:
target (
GLib.String
) –s (
str
) –
- Return type:
- GOffice.regfree(preg)¶
- Parameters:
preg (
GOffice.Regexp
) –
- GOffice.regression_stat_destroyl(stat_)¶
- Parameters:
stat (
GOffice.go_regression_stat_tl
) –
- GOffice.regression_stat_newl()¶
- Return type:
- GOffice.render_general(layout, str, measure, metrics, val, col_width, unicode_minus, numeral_shape, custom_shape_flags)¶
- Parameters:
layout (
Pango.Layout
) – OptionalPango.Layout
, probably preseeded withGOffice.font
attribute.str (
GLib.String
) – aGLib.String
to store (not append!) the resulting string in.measure (
GOffice.FormatMeasure
) – Function to measure width of string/layout.metrics (
GOffice.FontMetrics
) – Font metrics corresponding to measure.val (
float
) – floating-pointGOffice.value
. Must be finite.col_width (
int
) – intended max width of layout in the units that measure uses. A width of -1 means no restriction.unicode_minus (
bool
) – Use unicode minuses, not hyphens.numeral_shape (
int
) – numeral shape identifier.custom_shape_flags (
int
) – flags for using numeral_shape.
Render a floating-point
GOffice.value
into layout in such a way that the layouting width does not needlessly exceed col_width. Optionally use unicode minus instead of hyphen.
- GOffice.rsm_lookup(id, len)¶
- GOffice.rsm_register_file(id, data, len)¶
- GOffice.search_match_string(sr, src)¶
- Parameters:
sr (
GOffice.SearchReplace
) –src (
str
) –
- Return type:
- GOffice.set_file_permissions(uri, file_permissions)¶
- Parameters:
uri (
str
) –file_permissions (
GOffice.FilePermissions
) –
- GOffice.shell_argv_to_glib_encoding(argc, argv)¶
- Parameters:
- Returns:
the arguments in UTF-8 locale.
- Return type:
[
str
]
Transform arguments to UTF-8 when needed.
- GOffice.shell_argv_to_glib_encoding_free()¶
- GOffice.shutdown()¶
Decrements the counter for data initialized by
GOffice.init
(). When the counter reaches 0, the data is freed/cleaned up as appropriate.
- GOffice.sinpi(x)¶
- GOffice.stern_brocot(val, max_denom, res_num, res_denom)¶
- GOffice.strescape(target, str)¶
- Parameters:
target (
GLib.String
) –str (
str
) –
- GOffice.string_ERROR()¶
- Returns:
A string saying ‘ERROR’
- Return type:
A convenience for g_return_val to share one error string without adding a reference to functions that do not add references to the result
- GOffice.string_append_c_n(target, c, n)¶
- Parameters:
target (
GLib.String
) –c (
int
) –n (
int
) –
- GOffice.string_append_gstring(target, src)¶
- Parameters:
target (
GLib.String
) –src (
GLib.String
) –
- GOffice.string_cmp(gstr_a, gstr_b)¶
- GOffice.string_cmp_ignorecase(gstr_a, gstr_b)¶
- GOffice.string_equal(gstr_a, gstr_b)¶
- GOffice.string_equal_ignorecase(gstr_a, gstr_b)¶
- GOffice.string_equal_rich(gstr_a, gstr_b)¶
- GOffice.string_foreach_base(callback, *data)¶
- Parameters:
callback (
GLib.HFunc
) – callback
Iterates through the strings data base and apply callback to each.
- GOffice.string_replace(target, pos, oldlen, txt, newlen)¶
- Parameters:
target (
GLib.String
) –pos (
int
) –oldlen (
int
) –txt (
str
) –newlen (
int
) –
- GOffice.strsplit_to_slist(str, delimiter)¶
- Parameters:
- Returns:
string list which you should free after use using function g_slist_free_full(), using
GLib.free
as second argument.- Return type:
[
str
]
Splits up string into tokens at delim and returns a string list.
- GOffice.strtod(s)¶
- GOffice.strunescape(target, str)¶
- Parameters:
target (
GLib.String
) –str (
str
) –
- Return type:
- GOffice.sub_epsilon(x)¶
-
Returns the next-smaller representable
GOffice.value
, except that zero and infinites are returned unchanged.
- GOffice.tanpi(x)¶
- GOffice.unit_define(symbol, dim, factor_to_SI)¶
- Parameters:
- Returns:
the named
GOffice.Unit
. If aGOffice.Unit
of that name already exists, the existing is returned. Otherwise a new one is created.- Return type:
- GOffice.unit_get(id)¶
- Parameters:
id (
GOffice.UnitId
) –GOffice.UnitId
for unit to query- Returns:
the
GOffice.Unit
corresponding to id.- Return type:
GOffice.Unit
orNone
- GOffice.url_check_extension(uri, std_ext)¶
- Parameters:
- Returns:
False
if the uri has an extension not matching std_ext- new_uri:
New uri
- Return type:
Modifies given uri by adding the extension std_ext if needed. If no std_ext is given or uri already has some extension, it just copies uri.
Value in new_uri: newly allocated string which you should free after use, containing (optionally) modified uri.
- GOffice.url_encode(uri, type)¶
- Parameters:
- Returns:
encoded string.
- Return type:
url-encode a string according to RFC 2368.
- GOffice.url_resolve_relative(ref_uri, rel_uri)¶
- GOffice.utf8_strcapital(p, len)¶
- Parameters:
- Returns:
newly allocated string.
- Return type:
Similar to
GLib.utf8_strup
andGLib.utf8_strup
, except that this function creates a string “Very Much Like: This, One”.
- GOffice.uuid()¶
- Returns:
A string with RFC4122 version 4 random UUID
- Return type:
RFC4122 version 4 compliant random UUIDs generator.
- GOffice.xml_in_doc_dispose_on_exit(pdoc)¶
- Parameters:
pdoc (
Gsf.XMLInDoc
) –
- GOffice.xml_node_get_bool(node, name, result)¶
- Parameters:
node (
libxml2.NodePtr
) –name (
str
) –result (
bool
) –
- Return type:
- GOffice.xml_node_get_double(node, name, result)¶
- Parameters:
node (
libxml2.NodePtr
) –name (
str
) –result (
float
) –
- Return type:
- GOffice.xml_node_get_enum(node, name, etype, val)¶
- Parameters:
node (
libxml2.NodePtr
) –name (
str
) –etype (
GObject.GType
) –val (
int
) –
- Return type:
- GOffice.xml_node_get_gocolor(node, name, result)¶
- Parameters:
node (
libxml2.NodePtr
) –name (
str
) –result (
int
) –
- Return type:
- GOffice.xml_node_get_int(node, name, result)¶
- Parameters:
node (
libxml2.NodePtr
) –name (
str
) –result (
int
) –
- Return type:
- GOffice.xml_node_set_bool(node, name, val)¶
- Parameters:
node (
libxml2.NodePtr
) –name (
str
) –val (
bool
) –
- GOffice.xml_node_set_cstr(node, name, val)¶
- Parameters:
node (
libxml2.NodePtr
) –name (
str
) –val (
str
) –
- GOffice.xml_node_set_double(node, name, val, precision)¶
- Parameters:
node (
libxml2.NodePtr
) –name (
str
) –val (
float
) –precision (
int
) –
- GOffice.xml_node_set_enum(node, name, etype, val)¶
- Parameters:
node (
libxml2.NodePtr
) –name (
str
) –etype (
GObject.GType
) –val (
int
) –
- GOffice.xml_node_set_gocolor(node, name, val)¶
- Parameters:
node (
libxml2.NodePtr
) –name (
str
) –val (
int
) –
- GOffice.xml_node_set_int(node, name, val)¶
- Parameters:
node (
libxml2.NodePtr
) –name (
str
) –val (
int
) –
- GOffice.xml_out_add_color(out, id, c)¶
- Parameters:
out (
Gsf.XMLOut
) –id (
str
) –c (
int
) –
- GOffice.xml_out_add_double(output, id, d)¶
- Parameters:
output (
Gsf.XMLOut
) – destinationd (
float
) –GOffice.value
Output a representation of d that will be read back without loss of precision.