Functions

  accumulator_end (state)
  accumulator_endl (state)
  accumulator_functional ()
  accumulator_functionall ()
  add_epsilon (x)
  arrow_type_as_str (typ)
  arrow_type_from_str (name)
  ascii_strcase_equal (v, v2)
  ascii_strcase_hash (v)
  ascii_strtod (s, end)
  atan2pi (y, x)
  atanpi (x)
  atk_setup_label (label, target)
  basename_from_uri (uri)
  bezier_spline_init (x, y, n, closed)
  cairo_convert_data_from_pixbuf (dst, src, width, height, rowstride)
  cairo_convert_data_to_pixbuf (dst, src, width, height, rowstride)
  cairo_emit_svg_path (cr, path)
  cairo_surface_is_vector (surface)
  color_as_str (color)
  color_from_gdk_rgba (rgbacolor)
  color_from_str (str)
  color_selector_get_color (selector)
  color_selector_set_allow_alpha (selector, allow_alpha)
  color_selector_set_color (selector, color)
  color_to_gdk_rgba (color, res)
  complex_addl (dst, a, b)
  complex_conjl (dst, src)
  complex_cosl (dst, src)
  complex_divl (dst, a, b)
  complex_expl (dst, src)
  complex_from_stringl (dst, src, imunit)
  complex_invalid_pl (src)
  complex_invalidl (dst)
  complex_lnl (dst, src)
  complex_mull (dst, a, b)
  complex_powl (dst, a, b)
  complex_real_pl (src)
  complex_sinl (dst, src)
  complex_sqrtl (dst, src)
  complex_subl (dst, a, b)
  complex_tanl (dst, src)
  complex_to_polar (mod, angle, src)
  complex_to_stringl (src, reformat, imformat, imunit)
  complex_zero_pl (src)
  components_add_filter (chooser)
  components_add_mime_type (mime, priority, service_id)
  components_get_mime_suffix (mime)
  components_get_mime_types ()
  components_get_priority (mime_type)
  components_set_mime_suffix (mime, suffix)
  components_support_clipboard (mime_type)
  conf_add_monitor (node, key, monitor, *data)
  conf_free_node (node)
  conf_get_bool (node, key)
  conf_get_double (node, key)
  conf_get_enum_as_str (node, key)
  conf_get_int (node, key)
  conf_get_node (parent, key)
  conf_get_str_list (node, key)
  conf_get_string (node, key)
  conf_load_bool (node, key, default_val)
  conf_load_double (node, key, minima, maxima, default_val)
  conf_load_enum (node, key, t, default_val)
  conf_load_int (node, key, minima, maxima, default_val)
  conf_load_str_list (node, key)
  conf_load_string (node, key)
  conf_remove_monitor (monitor_id)
  conf_set_bool (node, key, val)
  conf_set_double (node, key, val)
  conf_set_enum (node, key, t, val)
  conf_set_int (node, key, val)
  conf_set_str_list (node, key, list)
  conf_set_string (node, key, str)
  conf_sync (node)
  continued_fraction (val, max_denom, res_num, res_denom)
  cospi (x)
  cotpi (x)
  coup_cd (res, settle, mat, freq, eom, next)
  coupdaybs (settlement, maturity, conv)
  coupdays (settlement, maturity, conv)
  coupdaysnc (settlement, maturity, conv)
  create_std_tags_for_buffer (buffer)
  cspline_destroyl (sp)
  cspline_init (x, y, n, limits, c0, cn)
  date_conv_equal (a, b)
  date_conv_from_str (s)
  date_conv_translate (f, src, dst)
  date_convention_base (conv)
  date_days_between_basis (from_, to, basis)
  date_g_months_between (date1, date2)
  date_g_to_serial (date, conv)
  date_g_years_between (date1, date2)
  date_month_name (m, abbrev)
  date_serial_raw_to_seconds (raw)
  date_serial_raw_to_serial (raw)
  date_serial_to_g (res, serial, conv)
  date_serial_to_timet (serial, conv)
  date_timet_to_seconds (t)
  date_timet_to_serial (t, conv)
  date_timet_to_serial_raw (t, conv)
  date_weekday_name (wd, abbrev)
  date_weeknum (date, method)
  dcauchy (x, location, scale, give_log)
  debug_check_finalized (obj, id)
  debug_flag (flag)
  destroy_password (passwd)
  dialog_guess_alternative_button_order (dialog)
  direction_get_name (d)
  direction_is_forward (d)
  direction_is_horizontal (d)
  dirname_from_uri (uri, brief)
  dlnorm (x, meanlog, sdlog, give_log)
  dnorm (x, mu, sigma, give_log)
  dweibull (x, shape, scale, give_log)
  error_export ()
  error_import ()
  error_invalid ()
  error_system ()
  exponential_regression (xss, dim, ys, n, affine, res, stat_)
  exponential_regression_as_log (xss, dim, ys, n, affine, res, stat_)
  fake_ceil (x)
  fake_floor (x)
  fake_round (x)
  fake_trunc (x)
  file_access (uri, mode)
  file_create (uri)
  file_get_date_accessed (uri)
  file_get_date_changed (uri)
  file_get_date_modified (uri)
  file_get_group_name (uri)
  file_get_modtime (uri)
  file_get_owner_name (uri)
  file_open (uri)
  file_split_urls (data)
  filename_from_uri (uri)
  filename_simplify (filename, dotdot, make_absolute)
  filename_to_uri (filename)
  finite (x)
  font_cache_register (callback)
  font_cache_unregister (callback)
  fonts_list_families (context)
  fonts_list_sizes ()
  format_allow_ee_markup ()
  format_allow_pi_slash ()
  format_allow_si ()
  format_default_accounting ()
  format_default_date ()
  format_default_date_time ()
  format_default_money ()
  format_default_percentage ()
  format_default_time ()
  format_empty ()
  format_foreach (func, *user_data)
  format_general ()
  format_generate_number_str (dst, min_digits, num_decimals, thousands_sep, negative_red, negative_paren, prefix, postfix)
  format_generate_str (dst, details)
  format_locale_currency ()
  format_measure_pango (str, layout)
  format_measure_strlen (str, layout)
  format_measure_zero (str, layout)
  format_output_to_odf (xout, fmt, cond_part, name, with_extension)
  format_palette_color_of_index (i)
  format_palette_index_from_color (c)
  format_palette_name_of_index (i)
  format_str_delocalize (str)
  format_str_localize (str)
  format_value_gstring (layout, str, measure, metrics, fmt, val, type, sval, go_color, col_width, date_conv, unicode_minus)
  fourier_fft (in_, n, skip, fourier, inverse)
  fourier_fftl (in_, n, skip, fourier, inverse)
  gdk_pixbuf_get_from_cache (filename)
  gdk_pixbuf_load_from_file (filename)
  geometry_AABR_add (aabr0, aabr1)
  geometry_OBR_to_AABR (obr, aabr)
  geometry_calc_label_anchor (obr, alpha)
  geometry_calc_label_position (obr, alpha, offset, side, anchor)
  geometry_cartesian_to_polar (x, y, rho, theta)
  geometry_get_rotation_type (alpha)
  geometry_point_to_segment (xp, yp, xs, ys, w, h)
  geometry_test_OBR_overlap (obr0, obr1)
  get_file_openers ()
  get_file_permissions (uri)
  get_file_savers ()
  get_mime_type (uri)
  get_mime_type_for_data (data, data_size)
  get_real_name ()
  gog_axis_map (map, value)
  gog_guru (graph, dalloc, cc, closure)
  gog_guru_add_custom_widget (guru, custom)
  gog_guru_get_help_button (guru)
  gog_xml_read_state_get_obj (xin)
  gradient_dir_as_str (dir)
  gradient_dir_from_str (name)
  gradient_selector_set_colors (selector, start, stop)
  gtk_builder_combo_box_init_text (gui, widget_name)
  gtk_builder_get_widget (gui, widget_name)
  gtk_builder_group_value (gui, group)
  gtk_builder_load (uifile, domain, gcc)
  gtk_builder_load_internal (uifile, domain, gcc)
  gtk_builder_signal_connect (gui, instance_name, detailed_signal, c_handler, *data)
  gtk_builder_signal_connect_swapped (gui, instance_name, detailed_signal, c_handler, *data)
  gtk_button_build_with_stock (text, stock_id)
  gtk_combo_box_append_text (combo, str)
  gtk_combo_box_remove_text (combo, position)
  gtk_dialog_add_button (dialog, text, stock_id, response_id)
  gtk_dialog_run (dialog, parent)
  gtk_editable_enters (window, w)
  gtk_file_sel_dialog (toplevel, w)
  gtk_grid_remove_row (grid, row)
  gtk_help_button_init (w, data_dir, app, link)
  gtk_nonmodal_dialog (toplevel, dialog)
  gtk_select_image (toplevel, initial)
  gtk_select_image_with_extra_widget (toplevel, initial, extra)
  gtk_url_is_writeable (parent, uri, overwrite_by_default)
  gtk_url_show (url, screen)
  gtk_widget_disable_focus (w)
  gtk_widget_render_icon_pixbuf (widget, icon_name, size)
  gtk_widget_replace (victim, replacement)
  gtk_window_set_transient (toplevel, window)
  guess_encoding (raw, len, user_guess, utf8_str, truncated)
  gui_get_image_save_info (toplevel, supported_formats, ret_format, resolution)
  hash_keys (hash)
  init ()
  io_count_progress_set (io_context, total, step)
  io_count_progress_update (io_context, inc)
  io_error_clear (ioc)
  io_error_display (ioc)
  io_error_info_set (ioc, error)
  io_error_occurred (ioc)
  io_error_push (ioc, error)
  io_error_string (ioc, str)
  io_error_unknown (ioc)
  io_progress_message (io_context, msg)
  io_progress_range_pop (io_context)
  io_progress_range_push (io_context, min, max)
  io_progress_unset (io_context)
  io_progress_update (io_context, f)
  io_value_progress_set (io_context, total, step)
  io_value_progress_update (io_context, value)
  io_warning_occurred (ioc)
  io_warning_unknown_font (ioc, font_name)
  io_warning_unknown_function (ioc, funct_name)
  io_warning_unsupported_feature (ioc, feature)
  line_dash_as_label (type)
  line_dash_as_str (type)
  line_dash_from_str (name)
  line_dash_get_length (type)
  line_dash_get_sequence (type, scale)
  line_interpolation_as_label (type)
  line_interpolation_as_str (type)
  line_interpolation_auto_skip (type)
  line_interpolation_from_str (name)
  line_interpolation_supports_radial (type)
  linear_regression (xss, dim, ys, n, affine)
  linear_regression_leverage (A, d, m, n)
  linear_solve (A, b, n, res)
  linear_solve_multiple (A, B, n, bn)
  list_index_custom (list, data, cmp_func)
  load_pango_attributes_into_buffer (markup, buffer, str)
  locale_24h ()
  locale_boolean_name (b)
  locale_get_arg_sep ()
  locale_get_col_sep ()
  locale_get_currency (precedes, space_sep)
  locale_get_date_format ()
  locale_get_decimal ()
  locale_get_row_sep ()
  locale_get_thousand ()
  locale_get_time_format ()
  locale_month_before_day ()
  locale_untranslated_booleans ()
  logarithmic_fit (xs, ys, n, res)
  logarithmic_regression (xss, dim, ys, n, affine, res, stat_)
  mathml_to_itex (mml, buf, length, compact, gcc)
  matrix_determinant (A, n)
  matrix_invert (A, n)
  matrix_pseudo_inverse (A, m, n, threshold, B)
  menu_position_below (menu, x, y, push_in, user_data)
  mime_to_image_format (mime_type)
  mime_type_get_description (mime_type)
  non_linear_regression (f, xvals, par, yvals, sigmas, x_dim, p_dim, chi, errors)
  object_properties_apply (obj, props, changed_only)
  object_properties_collect (obj)
  object_properties_free (props)
  object_set_property (obj, property_name, user_prop_name, value, err, error_template)
  object_toggle (object, property_name)
  pango_attr_list_erase (attrs, pos, len)
  pango_attr_list_is_empty (attrs)
  pango_attr_list_open_hole (tape, pos, len)
  pango_attr_list_unset (list, start, end, type)
  pango_attr_subscript_get_attr_type ()
  pango_attr_superscript_get_attr_type ()
  pango_attrs_to_markup (attrs, text)
  pango_measure_string (context, font_desc, str)
  pango_translate_attributes (attrs)
  pango_translate_layout (layout)
  parse_key_value (options, err, handler, user)
  pattern_as_str (pattern)
  pattern_from_str (name)
  pattern_selector_new (initial_type, default_type)
  pattern_selector_set_colors (selector, foreground, background)
  pcauchy (x, location, scale, lower_tail, log_p)
  plnorm (x, logmean, logsd, lower_tail, log_p)
  plugins_get_active_plugins ()
  plugins_get_available_plugins ()
  plugins_get_plugin_by_id (plugin_id)
  plugins_get_plugin_dir ()
  plugins_init (context, known_states, active_plugins, plugin_dirs, activate_new_plugins, default_loader_type)
  plugins_register_loader (id_str, service)
  plugins_rescan (ret_error, ret_new_plugins)
  plugins_shutdown ()
  plugins_unregister_loader (id_str)
  pnorm (x, mu, sigma, lower_tail, log_p)
  pnorm_both (x, cum, ccum, i_tail, log_p)
  pow10 (n)
  pow2 (n)
  power_regression (xss, dim, ys, n, affine, res, stat_)
  pweibull (x, shape, scale, lower_tail, log_p)
  qcauchy (p, location, scale, lower_tail, log_p)
  qlnorm (p, logmean, logsd, lower_tail, log_p)
  qnorm (p, mu, sigma, lower_tail, log_p)
  quad_acos (a)
  quad_acosl (a)
  quad_add (a, b)
  quad_addl (a, b)
  quad_asin (a)
  quad_asinl (a)
  quad_atan2 (y, x)
  quad_atan2l (y, x)
  quad_atan2pi (y, x)
  quad_atan2pil (y, x)
  quad_constant8 (data, base, scale)
  quad_cos (a)
  quad_cosl (a)
  quad_cospi (a)
  quad_cospil (a)
  quad_div (a, b)
  quad_divl (a, b)
  quad_dot_product (a, b)
  quad_dot_productl (a, b)
  quad_end (state)
  quad_endl (state)
  quad_exp (a)
  quad_expm1 (a)
  quad_expm1l (a)
  quad_floor (a)
  quad_floorl (a)
  quad_functional ()
  quad_functionall ()
  quad_hypot (a, b)
  quad_hypotl (a, b)
  quad_init (h)
  quad_log (a)
  quad_logl (a)
  quad_matrix_back_solvel (R, x, b, allow_degenerate)
  quad_matrix_copyl (A, B)
  quad_matrix_determinantl (A, res)
  quad_matrix_dumpl (A, fmt)
  quad_matrix_freel (A)
  quad_matrix_fwd_solvel (R, x, b, allow_degenerate)
  quad_matrix_multiplyl (C, A, B)
  quad_matrix_transposel (A, B)
  quad_mul (a, b)
  quad_mul12 (x, y)
  quad_mull (a, b)
  quad_pow (x, y)
  quad_qr_determinantl (qr, det)
  quad_qr_freel (qr)
  quad_qr_mark_degeneratel (qr, i)
  quad_qr_multiply_qtl (qr, x)
  quad_qr_rl (qr)
  quad_sin (a)
  quad_sinl (a)
  quad_sinpi (a)
  quad_sinpil (a)
  quad_sqrt (a)
  quad_sqrtl (a)
  quad_start ()
  quad_startl ()
  quad_sub (a, b)
  quad_subl (a, b)
  qweibull (p, shape, scale, lower_tail, log_p)
  range_average (xs, n, res)
  range_constant (xs, n)
  range_decreasing (xs, n)
  range_devsq (xs, n, res)
  range_fractile_inter (xs, n, res, f)
  range_fractile_inter_nonconst (xs, n, res, f)
  range_fractile_inter_sorted (xs, n, res, f)
  range_increasing (xs, n)
  range_max (xs, n, res)
  range_maxabs (xs, n, res)
  range_median_inter (xs, n, res)
  range_median_inter_nonconst (xs, n, res)
  range_median_inter_sorted (xs, n, res)
  range_min (xs, n, res)
  range_sort (xs, n)
  range_sum (xs, n, res)
  range_sumsq (xs, n, res)
  range_vary_uniformly (xs, n)
  regcomp (preg, pattern, cflags)
  regerror (errcode, preg, errbuf, errbuf_size)
  regexec (preg, string, nmatch, pmatch, eflags)
  regexp_quote (target, s)
  regexp_quote1 (target, s)
  regfree (preg)
  regression_stat_destroyl (stat_)
  regression_stat_newl ()
  render_general (layout, str, measure, metrics, val, col_width, unicode_minus, numeral_shape, custom_shape_flags)
  rint (x)
  rsm_lookup (id, len)
  rsm_register_file (id, data, len)
  rsm_unregister_file (id)
  search_match_string (sr, src)
  set_file_permissions (uri, file_permissions)
  setlocale (category, val)
  shell_arg_to_uri (arg)
  shell_argv_to_glib_encoding (argc, argv)
  shell_argv_to_glib_encoding_free ()
  shutdown ()
  sinpi (x)
  stern_brocot (val, max_denom, res_num, res_denom)
  str_compare (x, y)
  strescape (target, str)
  string_ERROR ()
  string_append_c_n (target, c, n)
  string_append_gstring (target, src)
  string_cmp (gstr_a, gstr_b)
  string_cmp_ignorecase (gstr_a, gstr_b)
  string_equal (gstr_a, gstr_b)
  string_equal_ignorecase (gstr_a, gstr_b)
  string_equal_rich (gstr_a, gstr_b)
  string_foreach_base (callback, *data)
  string_hash (gstr)
  string_replace (target, pos, oldlen, txt, newlen)
  strsplit_to_slist (str, delimiter)
  strtod (s, end)
  strunescape (target, str)
  sub_epsilon (x)
  sys_data_dir ()
  sys_extern_plugin_dir ()
  sys_icon_dir ()
  sys_lib_dir ()
  tanpi (x)
  trunc (x)
  unichar_issign (uc)
  unit_define (symbol, dim, factor_to_SI)
  unit_get (id)
  unit_get_from_symbol (symbol)
  url_check_extension (uri, std_ext)
  url_encode (uri, type)
  url_make_relative (uri, ref_uri)
  url_resolve_relative (ref_uri, rel_uri)
  url_simplify (uri)
  utf8_collate_casefold (a, b)
  utf8_strcapital (p, len)
  uuid ()
  xml_in_doc_dispose_on_exit (pdoc)
  xml_node_get_bool (node, name, result)
  xml_node_get_double (node, name, result)
  xml_node_get_enum (node, name, etype, val)
  xml_node_get_gocolor (node, name, result)
  xml_node_get_int (node, name, result)
  xml_node_set_bool (node, name, val)
  xml_node_set_cstr (node, name, val)
  xml_node_set_double (node, name, val, precision)
  xml_node_set_enum (node, name, etype, val)
  xml_node_set_gocolor (node, name, val)
  xml_node_set_int (node, name, val)
  xml_out_add_color (out, id, c)
  xml_out_add_double (output, id, d)

Details

GOffice.accumulator_end(state)
Parameters:state (object or None) –
GOffice.accumulator_endl(state)
Parameters:state (object or None) –
GOffice.accumulator_functional()
Return type:bool
GOffice.accumulator_functionall()
Return type:bool
GOffice.add_epsilon(x)
Parameters:x (float) –
Return type:float
GOffice.arrow_type_as_str(typ)
Parameters:typ (GOffice.ArrowType) –
Return type:str
GOffice.arrow_type_from_str(name)
Parameters:name (str) –
Return type:GOffice.ArrowType
GOffice.ascii_strcase_equal(v, v2)
Parameters:
Return type:

int

GOffice.ascii_strcase_hash(v)
Parameters:v (object or None) –
Return type:int
GOffice.ascii_strtod(s, end)
Parameters:
Return type:

float

GOffice.atan2pi(y, x)
Parameters:
Return type:

float

GOffice.atanpi(x)
Parameters:x (float) –
Return type:float
GOffice.atk_setup_label(label, target)
Parameters:

A convenience routine to setup label-for/labeled-by relationship between a pair of widgets

GOffice.basename_from_uri(uri)
Parameters:uri (str) – The uri
Returns:a string that the caller is responsible for freeing.
Return type:str

Decode the final path component. Returns as UTF-8 encoded suitable for display.

GOffice.bezier_spline_init(x, y, n, closed)
Parameters:
  • x (float) – the x values
  • y (float) – the y values
  • n (int) – the number of x and y values
  • closed (bool) – whether to return a closed curve or not
Returns:

a newly created struct GOffice.BezierSpline instance which should be destroyed by a call to GOffice.BezierSpline.destroy.

Return type:

GOffice.BezierSpline

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:
  • dst (int) – a pointer to pixel data in cairo format
  • src (int) – a pointer to pixel data in pixbuf format
  • width (int) – image width
  • height (int) – image height
  • rowstride (int) – data rowstride

Converts the pixel data stored in src in GdkPixbuf.Colorspace.RGB pixbuf format to cairo.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:
  • dst (int) – a pointer to pixel data in pixbuf format
  • src (int) – a pointer to pixel data in cairo format
  • width (int) – image width
  • height (int) – image height
  • rowstride (int) – data rowstride

Converts the pixel data stored in src in cairo.Format.ARGB32 cairo format to GdkPixbuf.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:

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:bool
GOffice.color_as_str(color)
Parameters:color (int) –
Return type:str
GOffice.color_from_gdk_rgba(rgbacolor)
Parameters:rgbacolor (Gdk.RGBA) – Gdk.RGBA to convert
Returns:resulting color
res:resulting color
Return type:(int, res: int)
GOffice.color_from_str(str)
Parameters:str (str) – String to parse
Returns:True if str can be parsed as a color of the form R:G:B:A and the result is stored in res.
res:the parsed color
Return type:(bool, res: int)
GOffice.color_selector_get_color(selector)
Parameters:selector (GOffice.Selector) – a GOffice.Selector
Returns:current color selection of selector.
is_auto:True if the current selection was set by clicking on automatic palette item.
Return type:(int, is_auto: bool)
GOffice.color_selector_set_allow_alpha(selector, allow_alpha)
Parameters:
  • selector (GOffice.Selector) – #GOColorSelector
  • allow_alpha (bool) – If True, 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:
Returns:

True if selection changed.

Return type:

bool

Sets current selection to color. An “activate” signal will be emitted.

GOffice.color_to_gdk_rgba(color, res)
Parameters:
Returns:

res

Return type:

Gdk.RGBA

GOffice.complex_addl(dst, a, b)
Parameters:
GOffice.complex_conjl(dst, src)
Parameters:
GOffice.complex_cosl(dst, src)
Parameters:
GOffice.complex_divl(dst, a, b)
Parameters:
GOffice.complex_expl(dst, src)
Parameters:
GOffice.complex_from_stringl(dst, src, imunit)
Parameters:
Return type:

int

GOffice.complex_invalid_pl(src)
Parameters:src (GOffice.Complexl) –
Return type:int
GOffice.complex_invalidl(dst)
Parameters:dst (GOffice.Complexl) –
GOffice.complex_lnl(dst, src)
Parameters:
GOffice.complex_mull(dst, a, b)
Parameters:
GOffice.complex_powl(dst, a, b)
Parameters:
GOffice.complex_real_pl(src)
Parameters:src (GOffice.Complexl) –
Return type:int
GOffice.complex_sinl(dst, src)
Parameters:
GOffice.complex_sqrtl(dst, src)
Parameters:
GOffice.complex_subl(dst, a, b)
Parameters:
GOffice.complex_tanl(dst, src)
Parameters:
GOffice.complex_to_polar(mod, angle, src)
Parameters:
GOffice.complex_to_stringl(src, reformat, imformat, imunit)
Parameters:
Return type:

str

GOffice.complex_zero_pl(src)
Parameters:src (GOffice.Complexl) –
Return type:int
GOffice.components_add_filter(chooser)
Parameters:chooser (Gtk.FileChooser) –
GOffice.components_add_mime_type(mime, priority, service_id)
Parameters:
GOffice.components_get_mime_suffix(mime)
Parameters:mime (str) –
Return type:str
GOffice.components_get_mime_types()
Returns:the list of mime types supported by at least one registered component.
Return type:[str]
GOffice.components_get_priority(mime_type)
Parameters:mime_type (str) –
Return type:GOffice.MimePriority
GOffice.components_set_mime_suffix(mime, suffix)
Parameters:
  • mime (str) –
  • suffix (str) –
GOffice.components_support_clipboard(mime_type)
Parameters:mime_type (str) –
Return type:bool
GOffice.conf_add_monitor(node, key, monitor, *data)
Parameters:
Returns:

the signal ID.

Return type:

int

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:
Return type:

bool

GOffice.conf_get_double(node, key)
Parameters:
Return type:

float

GOffice.conf_get_enum_as_str(node, key)
Parameters:
Return type:

str

GOffice.conf_get_int(node, key)
Parameters:
Return type:

int

GOffice.conf_get_node(parent, key)
Parameters:
Returns:

the GOffice.ConfNode associated with key

Return type:

GOffice.ConfNode

GOffice.conf_get_str_list(node, key)
Parameters:
Returns:

a list of strings asociated with key.

Return type:

[str]

GOffice.conf_get_string(node, key)
Parameters:
Return type:

str

GOffice.conf_load_bool(node, key, default_val)
Parameters:
Return type:

bool

GOffice.conf_load_double(node, key, minima, maxima, default_val)
Parameters:
Return type:

float

GOffice.conf_load_enum(node, key, t, default_val)
Parameters:
Return type:

int

GOffice.conf_load_int(node, key, minima, maxima, default_val)
Parameters:
Return type:

int

GOffice.conf_load_str_list(node, key)
Parameters:
Returns:

a list of strings asociated with key.

Return type:

[str]

GOffice.conf_load_string(node, key)
Parameters:
Return type:

str

GOffice.conf_remove_monitor(monitor_id)
Parameters:monitor_id (int) –
GOffice.conf_set_bool(node, key, val)
Parameters:
GOffice.conf_set_double(node, key, val)
Parameters:
GOffice.conf_set_enum(node, key, t, val)
Parameters:
GOffice.conf_set_int(node, key, val)
Parameters:
GOffice.conf_set_str_list(node, key, list)
Parameters:

Sets list as the GOffice.value for key.

GOffice.conf_set_string(node, key, str)
Parameters:
GOffice.conf_sync(node)
Parameters:node (GOffice.ConfNode) –
GOffice.continued_fraction(val, max_denom, res_num, res_denom)
Parameters:
  • val (float) –
  • max_denom (int) –
  • res_num (int) –
  • res_denom (int) –
GOffice.cospi(x)
Parameters:x (float) – a number
Returns:the cosine of Pi times x, but with less error than doing the multiplication outright.
Return type:float
GOffice.cotpi(x)
Parameters:x (float) –
Return type:float
GOffice.coup_cd(res, settle, mat, freq, eom, next)
Parameters:
GOffice.coupdaybs(settlement, maturity, conv)
Parameters:
Returns:

the number of days from the beginning of the coupon period to the settlement date.

Return type:

float

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:

float

GOffice.coupdaysnc(settlement, maturity, conv)
Parameters:
Returns:

the number of days from the settlement date to the next coupon date.

Return type:

float

GOffice.create_std_tags_for_buffer(buffer)
Parameters:buffer (Gtk.TextBuffer) –
GOffice.cspline_destroyl(sp)
Parameters:sp (GOffice.CSplinel) –
GOffice.cspline_init(x, y, n, limits, c0, cn)
Parameters:
  • x (float) – the x values
  • y (float) – the y values
  • n (int) – the number of x and y values
  • limits (int) – how the limits must be treated, four values are allowed: GOffice.CSplineType.NATURAL: first and least second derivatives are 0. GOffice.CSplineType.PARABOLIC: the curve will be a parabole arc outside of the limits. GOffice.CSplineType.CUBIC: the curve will be cubic outside of the limits. GOffice.CSplineType.CLAMPED: the first and last derivatives are imposed.
  • c0 (float) – the first derivative when using clamped splines, not used in the other limit types.
  • cn (float) – the first derivative when using clamped splines, not used in the other limit types.
Returns:

a newly created GOffice.CSpline instance which should be destroyed by a call to GOffice.CSpline.destroy.

Return type:

GOffice.CSpline

Creates a spline structure, and computes the coefficients associated with the polynoms. The ith polynome (between x[i-1] and x[i] is: y(x) = y[i-1] + (c[i-1] + (b[i-1] + a[i] * (x - x[i-1])) * (x - x[i-1])) * (x - x[i-1]) where a[i-1], b[i-1], c[i-1], x[i-1] and y[i-1] are the corresponding members of the new structure.

GOffice.date_conv_equal(a, b)
Parameters:
Return type:

bool

GOffice.date_conv_from_str(s)
Parameters:s (str) –
Return type:GOffice.DateConventions
GOffice.date_conv_translate(f, src, dst)
Parameters:
Return type:

float

GOffice.date_convention_base(conv)
Parameters:conv (GOffice.DateConventions) –
Return type:int
GOffice.date_days_between_basis(from_, to, basis)
Parameters:
Return type:

int

GOffice.date_g_months_between(date1, date2)
Parameters:
Return type:

int

GOffice.date_g_to_serial(date, conv)
Parameters:
Return type:

int

GOffice.date_g_years_between(date1, date2)
Parameters:
Return type:

int

GOffice.date_month_name(m, abbrev)
Parameters:
Return type:

str

GOffice.date_serial_raw_to_seconds(raw)
Parameters:raw (float) –
Return type:int
GOffice.date_serial_raw_to_serial(raw)
Parameters:raw (float) –
Return type:int
GOffice.date_serial_to_g(res, serial, conv)
Parameters:
GOffice.date_serial_to_timet(serial, conv)
Parameters:
Return type:

int

GOffice.date_timet_to_seconds(t)
Parameters:t (int) –
Return type:int
GOffice.date_timet_to_serial(t, conv)
Parameters:
Return type:

int

GOffice.date_timet_to_serial_raw(t, conv)
Parameters:
Return type:

float

GOffice.date_weekday_name(wd, abbrev)
Parameters:
Return type:

str

GOffice.date_weeknum(date, method)
Parameters:
  • date (GLib.Date) – date
  • method (int) – week numbering method
Returns:

week number according to the given method. 1: Week starts on Sunday. January 1 is in week 1. 2: Week starts on Monday. January 1 is in week 1. 150: ISO 8601 week number.

Return type:

int

GOffice.dcauchy(x, location, scale, give_log)
Parameters:
Return type:

float

GOffice.debug_check_finalized(obj, id)
Parameters:
GOffice.debug_flag(flag)
Parameters:flag (str) –
Return type:bool
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:str
GOffice.direction_is_forward(d)
Parameters:d (GOffice.Direction) – GOffice.Direction
Returns:True for GOffice.Direction.DOWN or GOffice.Direction.RIGHT.
Return type:bool
GOffice.direction_is_horizontal(d)
Parameters:d (GOffice.Direction) – GOffice.Direction
Returns:True for GOffice.Direction.LEFT and GOffice.Direction.RIGHT.
Return type:bool
GOffice.dirname_from_uri(uri, brief)
Parameters:
  • uri (str) – target
  • brief (bool) – if True, hide “file://” if present.
Returns:

dirname which the caller is responsible for freeing.

Return type:

str

Decode the all but the final path component. Returns as UTF-8 encoded suitable for display.

GOffice.dlnorm(x, meanlog, sdlog, give_log)
Parameters:
Return type:

float

GOffice.dnorm(x, mu, sigma, give_log)
Parameters:
Return type:

float

GOffice.dweibull(x, shape, scale, give_log)
Parameters:
Return type:

float

GOffice.error_export()
Return type:int
GOffice.error_import()
Return type:int
GOffice.error_invalid()
Return type:int
GOffice.error_system()
Return type:int
GOffice.exponential_regression(xss, dim, ys, n, affine, res, stat_)
Parameters:
  • xss (float) – x-vectors (i.e. independent data)
  • dim (int) – number of x-vectors
  • ys (float) – y-vector (dependent data)
  • n (int) – number of data points
  • affine (bool) – if True, a non-one multiplier is allowed
  • res (float) – output place for constant[0] and root1[1], root2[2],… There will be dim+1 results.
  • stat (GOffice.go_regression_stat_t) – non-None storage for additional results.
Returns:

GOffice.RegressionResult as above.

Return type:

GOffice.RegressionResult

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, stat_)
Parameters:
  • xss (float) – x-vectors (i.e. independent data)
  • dim (int) – number of x-vectors
  • ys (float) – y-vector (dependent data)
  • n (int) – number of data points
  • affine (bool) – if True, a non-one multiplier is allowed
  • res (float) – output place for constant[0] and root1[1], root2[2],… There will be dim+1 results.
  • stat (GOffice.go_regression_stat_t) – non-None storage for additional results.
Returns:

GOffice.RegressionResult as above.

Return type:

GOffice.RegressionResult

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)
Parameters:x (float) –
Return type:float
GOffice.fake_floor(x)
Parameters:x (float) –
Return type:float
GOffice.fake_round(x)
Parameters:x (float) –
Return type:float
GOffice.fake_trunc(x)
Parameters:x (float) –
Return type:float
GOffice.file_access(uri, mode)
Parameters:
  • uri (str) –
  • mode (int) –
Return type:

int

GOffice.file_create(uri)
Parameters:uri (str) – target uri
Raises:GLib.Error
Returns:non-None on success
Return type:Gsf.Output

Creates a file or return an error. If the file already exists, it is replaced.

GOffice.file_get_date_accessed(uri)
Parameters:uri (str) –
Return type:int
GOffice.file_get_date_changed(uri)
Parameters:uri (str) –
Return type:int
GOffice.file_get_date_modified(uri)
Parameters:uri (str) –
Return type:int
GOffice.file_get_group_name(uri)
Parameters:uri (str) –
Return type:str
GOffice.file_get_modtime(uri)
Parameters:uri (str) – The uri
Returns:the modification time of the file, or None if it could not be determined.
Return type:GLib.DateTime

Determine the last modification time of uri.

GOffice.file_get_owner_name(uri)
Parameters:uri (str) –
Return type:str
GOffice.file_open(uri)
Parameters:uri (str) – target uri
Raises:GLib.Error
Returns:non-None on success
Return type:Gsf.Input

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_from_uri(uri)
Parameters:uri (str) –
Return type:str
GOffice.filename_simplify(filename, dotdot, make_absolute)
Parameters:
Return type:

str

GOffice.filename_to_uri(filename)
Parameters:filename (str) –
Return type:str
GOffice.finite(x)
Parameters:x (float) –
Return type:int
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. The list must be freed.
Return type:[int]
GOffice.format_allow_ee_markup()
Return type:bool
GOffice.format_allow_pi_slash()
Return type:bool
GOffice.format_allow_si()
Return type:bool
GOffice.format_default_accounting()
Returns:the default accounting format
Return type:GOffice.Format
GOffice.format_default_date()
Returns:the default date format
Return type:GOffice.Format
GOffice.format_default_date_time()
Returns:the default date-and-time format
Return type:GOffice.Format
GOffice.format_default_money()
Returns:the default monetary format
Return type:GOffice.Format
GOffice.format_default_percentage()
Returns:the default percentage format
Return type:GOffice.Format
GOffice.format_default_time()
Returns:the default time format
Return type:GOffice.Format
GOffice.format_empty()
Returns:the empty format
Return type:GOffice.Format
GOffice.format_foreach(func, *user_data)
Parameters:
  • func (GLib.HFunc) – function to execute for each known format
  • user_data (object or None) – user data for func

Executes func for each registered GOffice.Format

GOffice.format_general()
Returns:the general format
Return type:GOffice.Format
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 decimals
  • thousands_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 format
  • postfix (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:
GOffice.format_locale_currency()
Returns:The GOffice.FormatCurrency matches the current locale.
Return type:GOffice.FormatCurrency
GOffice.format_measure_pango(str, layout)
Parameters:
Return type:

int

GOffice.format_measure_strlen(str, layout)
Parameters:
Return type:

int

GOffice.format_measure_zero(str, layout)
Parameters:
Return type:

int

GOffice.format_output_to_odf(xout, fmt, cond_part, name, with_extension)
Parameters:
Return type:

bool

GOffice.format_palette_color_of_index(i)
Parameters:i (int) –
Return type:int
GOffice.format_palette_index_from_color(c)
Parameters:c (int) – color
Returns:the index of the color closest to the argument color in some sense.
Return type:int
GOffice.format_palette_name_of_index(i)
Parameters:i (int) –
Return type:str
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:str

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:str

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:
Returns:

a GOffice.FormatNumberError

Return type:

GOffice.FormatNumberError

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:
GOffice.fourier_fftl(in_, n, skip, fourier, inverse)
Parameters:
GOffice.gdk_pixbuf_get_from_cache(filename)
Parameters:filename (str) – pixbuf filename
Returns:a GdkPixbuf.Pixbuf, None on error.
Return type:GdkPixbuf.Pixbuf

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:GdkPixbuf.Pixbuf

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:

Computes the Axis Aligned Bounding Rectangle of aabr0 and aabr1, and stores result in aabr0.

GOffice.geometry_OBR_to_AABR(obr, aabr)
Parameters:

Stores Axis Aligned Bounding Rectangle of obr in aabr.

GOffice.geometry_calc_label_anchor(obr, alpha)
Parameters:
Returns:

computed label anchor, to be used by GOffice.geometry_calc_label_position.

Return type:

GOffice.GeometrySide

GOffice.geometry_calc_label_position(obr, alpha, offset, side, anchor)
Parameters:
Returns:

the computed anchor if anchor == GOffice.GeometrySide.AUTO, or anchor GOffice.value.

Return type:

GOffice.GeometrySide

Convenience routine that computes position of a label relative to an axis.

GOffice.geometry_cartesian_to_polar(x, y, rho, theta)
Parameters:
  • x (float) – cartesian coordinate
  • y (float) – cartesian coordinate
  • rho (float) – polar coordinate
  • theta (float) – polar coordinate

Converts cartesion coordinates to polar coordinates.

GOffice.geometry_get_rotation_type(alpha)
Parameters:alpha (float) – angle in radians
Returns:a GOffice.GeometryRotationType
Return type:GOffice.GeometryRotationType

Calculates rotation type for handling of special angles (alpha = n * pi / 2)

GOffice.geometry_point_to_segment(xp, yp, xs, ys, w, h)
Parameters:
  • xp (float) – point coordinate
  • yp (float) – point coordinate
  • xs (float) – segment start coordinate
  • ys (float) – segment start coordinate
  • w (float) – extent of segment
  • h (float) – extent of segment
Returns:

the distance between a point and a segment.

Return type:

float

GOffice.geometry_test_OBR_overlap(obr0, obr1)
Parameters:
Returns:

True if OOBRs overlap

Return type:

bool

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.FileOpener]
GOffice.get_file_permissions(uri)
Parameters:uri (str) –
Return type:GOffice.FilePermissions
GOffice.get_file_savers()
Returns:list of known GOffice.FileSaver types (do not modify list)
Return type:[GOffice.FileSaver]
GOffice.get_mime_type(uri)
Parameters:uri (str) – the uri.
Returns:the mime type for the file as a newly allocated string. Needs to be freed with GLib.free().
Return type:str
GOffice.get_mime_type_for_data(data, data_size)
Parameters:
  • data (object or None) – the data.
  • data_size (int) – the data size
Returns:

the mime type for the data as a newly allocated string. Needs to be freed with GLib.free().

Return type:

str

GOffice.get_real_name()
Returns:a utf8 encoded string with the current user name.
Return type:str
GOffice.gog_axis_map(map, value)
Parameters:
Returns:

mapped GOffice.value.

Return type:

float

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:
Returns:

the dialog, and shows new graph guru.

Return type:

Gtk.Widget

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:
GOffice.gog_guru_get_help_button(guru)
Parameters:guru (Gtk.Widget) – Gtk.Widget (the result of GOffice.gog_guru).
Returns:Gtk.Widget associated with the gurus help button.
Return type:Gtk.Widget

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:xin (Gsf.XMLIn) – Gsf.XMLIn
Returns:the laset rerad GOffice.GraphObject
Return type:GOffice.GraphObject
GOffice.gradient_dir_as_str(dir)
Parameters:dir (GOffice.GradientDirection) –
Return type:str
GOffice.gradient_dir_from_str(name)
Parameters:name (str) –
Return type:GOffice.GradientDirection
GOffice.gradient_selector_set_colors(selector, start, stop)
Parameters:
GOffice.gtk_builder_combo_box_init_text(gui, widget_name)
Parameters:
Returns:

the Gtk.ComboBox or None

Return type:

Gtk.ComboBox

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:
Returns:

a new Gtk.Widget or None

Return type:

Gtk.Widget

Simple wrapper to Gtk.Builder.get_object which returns the object as a Gtk.Widget.

GOffice.gtk_builder_group_value(gui, group)
Parameters:
Return type:

int

GOffice.gtk_builder_load(uifile, domain, gcc)
Parameters:
Returns:

a new Gtk.Builder or None

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:

Gtk.Builder

Simple utility to open ui files

New in version 0.9.6.

GOffice.gtk_builder_load_internal(uifile, domain, gcc)
Parameters:
Returns:

a new Gtk.Builder or None

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:

Gtk.Builder

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:
Returns:

The signal id

Return type:

int

Convenience wrapper around g_signal_connect for Gtk.Builder.

GOffice.gtk_builder_signal_connect_swapped(gui, instance_name, detailed_signal, c_handler, *data)
Parameters:
Returns:

The signal id

Return type:

int

Convenience wrapper around g_signal_connect_swapped for Gtk.Builder.

GOffice.gtk_button_build_with_stock(text, stock_id)
Parameters:
  • text (str) – button label
  • stock_id (str) – icon name (or stock id)
Returns:

newly created button

Return type:

Gtk.Widget

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:
GOffice.gtk_combo_box_remove_text(combo, position)
Parameters:
GOffice.gtk_dialog_add_button(dialog, text, stock_id, response_id)
Parameters:
  • dialog (Gtk.Dialog) – dialog you want to add a button
  • text (str) – button label
  • stock_id (str) – stock icon id
  • response_id (int) – respond id when button clicked
Returns:

newly created button

Return type:

Gtk.Widget

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:
Returns:

result ID.

Return type:

int

Pop up a dialog as child of a window.

GOffice.gtk_editable_enters(window, w)
Parameters:

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:
Returns:

True if a file was selected.

Return type:

bool

Runs a modal dialog to select a file.

GOffice.gtk_grid_remove_row(grid, row)
Parameters:
GOffice.gtk_help_button_init(w, data_dir, app, link)
Parameters:
GOffice.gtk_nonmodal_dialog(toplevel, dialog)
Parameters:

Utility to set dialog as a transient of toplevel and to set up a handler for “Escape”

GOffice.gtk_select_image(toplevel, initial)
Parameters:
Return type:

str

GOffice.gtk_select_image_with_extra_widget(toplevel, initial, extra)
Parameters:
Return type:

str

GOffice.gtk_url_is_writeable(parent, uri, overwrite_by_default)
Parameters:
Returns:

True if url is writable

Return type:

bool

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 show
  • screen (Gdk.Screen) – screen to show the uri on or None for the default screen
Returns:

None on sucess, or a newly allocated GLib.Error if something went wrong.

Return type:

GLib.Error

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 targeted
  • icon_name (str) – the name of the icon to render
  • size (Gtk.IconSize) – the symbolic size desired.
Returns:

A GdkPixbuf.Pixbuf.

Return type:

GdkPixbuf.Pixbuf

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:
GOffice.gtk_window_set_transient(toplevel, window)
Parameters:

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)
Parameters:
Return type:

str

GOffice.gui_get_image_save_info(toplevel, supported_formats, ret_format, resolution)
Parameters:
Returns:

file URI string, file GOffice.ImageFormat stored in ret_format, and export resolution in resolution.

Return type:

str

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:
GOffice.io_count_progress_update(io_context, inc)
Parameters:
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:
GOffice.io_error_occurred(ioc)
Parameters:ioc (GOffice.IOContext) –
Return type:bool
GOffice.io_error_push(ioc, error)
Parameters:
GOffice.io_error_string(ioc, str)
Parameters:
GOffice.io_error_unknown(ioc)
Parameters:ioc (GOffice.IOContext) –
GOffice.io_progress_message(io_context, msg)
Parameters:
GOffice.io_progress_range_pop(io_context)
Parameters:io_context (GOffice.IOContext) –
GOffice.io_progress_range_push(io_context, min, max)
Parameters:
GOffice.io_progress_unset(io_context)
Parameters:io_context (GOffice.IOContext) –
GOffice.io_progress_update(io_context, f)
Parameters:
GOffice.io_value_progress_set(io_context, total, step)
Parameters:
GOffice.io_value_progress_update(io_context, value)
Parameters:
GOffice.io_warning_occurred(ioc)
Parameters:ioc (GOffice.IOContext) –
Return type:bool
GOffice.io_warning_unknown_font(ioc, font_name)
Parameters:
GOffice.io_warning_unknown_function(ioc, funct_name)
Parameters:
GOffice.io_warning_unsupported_feature(ioc, feature)
Parameters:
GOffice.line_dash_as_label(type)
Parameters:type (GOffice.LineDashType) – a GOffice.LineDashType
Returns:a pointer to the user readable name of the dash type, or the name of GOffice.LineDashType.NONE if type is invalid. The returned string should not be freed.
Return type:str
GOffice.line_dash_as_str(type)
Parameters:type (GOffice.LineDashType) – a GOffice.LineDashType
Returns:a pointer to the nickname of the dash type, or “none” if type is invalid. The returning string should not be freed.
Return type:str
GOffice.line_dash_from_str(name)
Parameters:name (str) – Name of the dash type
Returns:a GOffice.LineDashType corresponding to name, or GOffice.LineDashType.NONE if not found.
Return type:GOffice.LineDashType
GOffice.line_dash_get_length(type)
Parameters:type (GOffice.LineDashType) – GOffice.LineDashType
Returns:the unscaled length of the dash sequence.
Return type:float
GOffice.line_dash_get_sequence(type, scale)
Parameters:
Returns:

a struct containing the dash sequence corresponding to type, or None if type is invalid or equal to GOffice.LineDashType.NONE. The lengths are scaled according to scale.

Return type:

GOffice.LineDashSequence

GOffice.line_interpolation_as_label(type)
Parameters:type (GOffice.LineInterpolation) – an interpolation type
Returns:a pointer to the label of type, or the name of GOffice.LineInterpolation.LINEAR if type is invalid. The returned string should not be freed.
Return type:str
GOffice.line_interpolation_as_str(type)
Parameters:type (GOffice.LineInterpolation) – an interpolation type
Returns:a pointer to the nickname of type, or “linear” if type is invalid. The returned string should not be freed.
Return type:str
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:bool
GOffice.line_interpolation_from_str(name)
Parameters:name (str) – an interpolation type nickname
Returns:a GOffice.LineInterpolation corresponding to name, or GOffice.LineInterpolation.LINEAR if not found.
Return type:GOffice.LineInterpolation
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 can’t.
Return type:bool
GOffice.linear_regression(xss, dim, ys, n, affine)
Parameters:
  • xss (float) – x-vectors (i.e. independent data)
  • dim (int) – number of x-vectors.
  • ys (float) – y-vector. (Dependent data.)
  • n (int) – number of data points.
  • affine (bool) – if true, a non-zero constant is allowed.
Returns:

GOffice.RegressionResult as above.

res:place for constant[0] and slope1[1], slope2[2],… There will be dim+1 results.
stat_:non-None 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.RegressionResult

GOffice.linear_solve(A, b, n, res)
Parameters:
Return type:

GOffice.RegressionResult

GOffice.linear_solve_multiple(A, B, n, bn)
Parameters:
Return type:

GOffice.RegressionResult

GOffice.list_index_custom(list, data, cmp_func)
Parameters:
Returns:

the data index in the list.

Return type:

int

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:
GOffice.locale_24h()
Returns:True if the locale uses a 24h clock, False otherwise.
Return type:bool
GOffice.locale_boolean_name(b)
Parameters:b (bool) – a boolean GOffice.value
Returns:Current locale’s rendering of b.
Return type:str
GOffice.locale_get_arg_sep()
Return type:int
GOffice.locale_get_col_sep()
Return type:int
GOffice.locale_get_currency(precedes, space_sep)
Parameters:
  • precedes (bool) – a pointer to a boolean which is set to True if the currency should precede
  • space_sep (bool) – a pointer to a boolean which is set to True if the currency should have a space separating it from the GOffice.value
Returns:

A string with the default currency

Return type:

GLib.String

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:GLib.String
GOffice.locale_get_decimal()
Returns:Current locale’s decimal separator.
Return type:GLib.String
GOffice.locale_get_row_sep()
Return type:int
GOffice.locale_get_thousand()
Returns:Current locale’s thousands separator. This may be an empty string.
Return type:GLib.String
GOffice.locale_get_time_format()
Returns:Current locale’s time format as a string.
Return type:GLib.String
GOffice.locale_month_before_day()
Return type:int
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:
  • xs (float) – x-vector (i.e. independent data)
  • ys (float) – y-vector (dependent data)
  • n (int) – number of data points
  • res (float) – output place for sign[0], a[1], b[2], c[3], and sum of squared residuals[4].
Returns:

GOffice.RegressionResult as above.

Return type:

GOffice.RegressionResult

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, stat_)
Parameters:
  • xss (float) – x-vectors (i.e. independent data)
  • dim (int) – number of x-vectors
  • ys (float) – y-vector (dependent data)
  • n (int) – number of data points
  • affine (bool) – if True, a non-zero constant is allowed
  • res (float) – output place for constant[0] and factor1[1], factor2[2],… There will be dim+1 results.
  • stat (GOffice.go_regression_stat_t) – non-None storage for additional results.
Returns:

GOffice.RegressionResult as above.

Return type:

GOffice.RegressionResult

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)
Parameters:
Return type:

bool

GOffice.matrix_determinant(A, n)
Parameters:
Return type:

float

GOffice.matrix_invert(A, n)
Parameters:
Return type:

bool

GOffice.matrix_pseudo_inverse(A, m, n, threshold, B)
Parameters:
GOffice.menu_position_below(menu, x, y, push_in, user_data)
Parameters:
  • menu (Gtk.Menu) – a Gtk.Menu
  • x (int) – non-None storage for the X coordinate of the menu
  • y (int) – non-None storage for the Y coordinate of the menu
  • push_in (int) – non-None storage for the push-in distance
  • user_data (object or None) – arbitrary

Implementation of a Gtk.MenuPositionFunc that positions the child window under the parent one, for use with Gtk.Menu.popup.

GOffice.mime_to_image_format(mime_type)
Parameters:mime_type (str) – a mime type string
Returns:file extension for the given mime type.
Return type:str
GOffice.mime_type_get_description(mime_type)
Parameters:mime_type (str) – the mime type to describe.
Returns:the description for the mime type as a newly allocated string. Needs to be freed with GLib.free(). If the description is not found, the mime type itself will be returned.
Return type:str
GOffice.non_linear_regression(f, xvals, par, yvals, sigmas, x_dim, p_dim, chi, errors)
Parameters:
  • f (GOffice.RegressionFunction) – the model function
  • xvals (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. This GOffice.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:

GOffice.RegressionResult

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:

Sets a list of properties for obj. The list needs to be a list of alternating GObject.ParamSpec and GObject.Value.

GOffice.object_properties_collect(obj)
Parameters:obj (GObject.Object) – GObject.Object
Returns:the list of collected properties as GObject.ParamSpec and values as GObject.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

Unsezts the values in the list which needs to be a list of alternating GObject.ParamSpec and GObject.Value.

GOffice.object_set_property(obj, property_name, user_prop_name, value, err, error_template)
Parameters:
Return type:

bool

GOffice.object_toggle(object, property_name)
Parameters:

Toggle a boolean object property.

GOffice.pango_attr_list_erase(attrs, pos, len)
Parameters:
  • attrs (Pango.AttrList) – An attribute list
  • pos (int) – a text position in bytes
  • len (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:bool
GOffice.pango_attr_list_open_hole(tape, pos, len)
Parameters:
  • tape (Pango.AttrList) – An attribute list
  • pos (int) – a text position in bytes
  • len (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:

See http://bugzilla.gnome.org/show_bug.cgi?id=163679

GOffice.pango_attr_subscript_get_attr_type()
Return type:Pango.AttrType
GOffice.pango_attr_superscript_get_attr_type()
Return type:Pango.AttrType
GOffice.pango_attrs_to_markup(attrs, text)
Parameters:
Return type:

str

GOffice.pango_measure_string(context, font_desc, str)
Parameters:
Returns:

the pixel length of str according to context.

Return type:

int

A utility function to measure text.

GOffice.pango_translate_attributes(attrs)
Parameters:attrs (Pango.AttrList) –
Return type:Pango.AttrList
GOffice.pango_translate_layout(layout)
Parameters:layout (Pango.Layout) –
GOffice.parse_key_value(options, err, handler, user)
Parameters:
Return type:

bool

GOffice.pattern_as_str(pattern)
Parameters:pattern (GOffice.PatternType) –
Return type:str
GOffice.pattern_from_str(name)
Parameters:name (str) –
Return type:GOffice.PatternType
GOffice.pattern_selector_new(initial_type, default_type)
Parameters:
Returns:

a new Gtk.Widget.

Return type:

Gtk.Widget

Creates a new pattern selector.

GOffice.pattern_selector_set_colors(selector, foreground, background)
Parameters:

Updates swatch colors of selector.

GOffice.pcauchy(x, location, scale, lower_tail, log_p)
Parameters:
Return type:

float

GOffice.plnorm(x, logmean, logsd, lower_tail, log_p)
Parameters:
Return type:

float

GOffice.plugins_get_active_plugins()
Returns:the list of active plugins names.
Return type:[str]
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.Plugin]
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 or None if there’s no plugin available with given id. Function returns “borrowed” reference, use GObject.Object.ref if you want to be sure that plugin won’t disappear.
Return type:GOffice.Plugin
GOffice.plugins_get_plugin_dir()
Return type:str
GOffice.plugins_init(context, known_states, active_plugins, plugin_dirs, activate_new_plugins, default_loader_type)
Parameters:
  • context (GOffice.CmdContext or None) – GOffice.CmdContext used to report errors
  • known_states ([str] or None) – A list of known states (defined how ?)
  • active_plugins ([str] or None) – A list of active plugins
  • plugin_dirs ([str] or None) – a list of directories to search for plugins
  • activate_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:

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:
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)
Parameters:
Return type:

float

GOffice.pnorm_both(x, cum, ccum, i_tail, log_p)
Parameters:
GOffice.pow10(n)
Parameters:n (int) –
Return type:float
GOffice.pow2(n)
Parameters:n (int) –
Return type:float
GOffice.power_regression(xss, dim, ys, n, affine, res, stat_)
Parameters:
  • xss (float) – x-vectors (i.e. independent data)
  • dim (int) – number of x-vectors
  • ys (float) – y-vector (dependent data)
  • n (int) – number of data points
  • affine (bool) – if True, a non-one multiplier is allowed
  • res (float) – output place for constant[0] and root1[1], root2[2],… There will be dim+1 results.
  • stat (GOffice.go_regression_stat_t) – non-None storage for additional results.
Returns:

GOffice.RegressionResult as above.

Return type:

GOffice.RegressionResult

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)
Parameters:
Return type:

float

GOffice.qcauchy(p, location, scale, lower_tail, log_p)
Parameters:
Return type:

float

GOffice.qlnorm(p, logmean, logsd, lower_tail, log_p)
Parameters:
Return type:

float

GOffice.qnorm(p, mu, sigma, lower_tail, log_p)
Parameters:
Return type:

float

GOffice.quad_acos(a)
Parameters:a (GOffice.Quad) – quad-precision GOffice.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-precision GOffice.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:
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:
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-precision GOffice.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-precision GOffice.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:
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:
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:
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:
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:
  • data (bytes) – vector of digits
  • base (float) – base of vector’s elements
  • scale (float) – scaling GOffice.value after interpreting digits
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-precision GOffice.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-precision GOffice.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-precision GOffice.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-precision GOffice.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:
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:
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:
Returns:

result location

Return type:

res: GOffice.Quad

GOffice.quad_dot_productl(a, b)
Parameters:
Returns:

result location

Return type:

res: GOffice.Quadl

GOffice.quad_end(state)
Parameters:state (object or None) – state pointer from GOffice.Quad.start.

This ends a section of quad precision arithmetic.

GOffice.quad_endl(state)
Parameters:state (object or None) – state pointer from GOffice.Quad.startl.

This ends a section of quad precision arithmetic.

GOffice.quad_exp(a)
Parameters:a (GOffice.Quad) – quad-precision GOffice.value
Returns:
res:result location
exp2:(allow-none): power-of-2 result scaling location
Return type:(res: GOffice.Quad, exp2: float)

This function computes the exponential function at a, storing the result in res. If the optional exp2 is supplied, it is used to return a power of 2 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-precision GOffice.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-precision GOffice.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-precision GOffice.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-precision GOffice.value
Returns:result location
Return type:res: GOffice.Quadl

This function takes the floor of a, storing the result in res.

GOffice.quad_functional()
Return type:bool
GOffice.quad_functionall()
Return type:bool
GOffice.quad_hypot(a, b)
Parameters:
Returns:

result location

Return type:

res: GOffice.Quad

This function computes the square root of a^2 plugs b^2, storing the result in res.

GOffice.quad_hypotl(a, b)
Parameters:
Returns:

result location

Return type:

res: GOffice.Quadl

This function computes the square root of a^2 plugs b^2, storing the result in res.

GOffice.quad_init(h)
Parameters:h (float) – a double precision GOffice.value
Returns:result location
Return type:res: GOffice.Quad

This stores the GOffice.value h in res. As an exception, this may be called outside GOffice.Quad.start and GOffice.Quad.end sections.

GOffice.quad_log(a)
Parameters:a (GOffice.Quad) – quad-precision GOffice.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-precision GOffice.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, x, b, allow_degenerate)
Parameters:
Return type:

bool

GOffice.quad_matrix_copyl(A, B)
Parameters:
GOffice.quad_matrix_determinantl(A, res)
Parameters:
GOffice.quad_matrix_dumpl(A, fmt)
Parameters:
GOffice.quad_matrix_freel(A)
Parameters:A (GOffice.QuadMatrixl) –
GOffice.quad_matrix_fwd_solvel(R, x, b, allow_degenerate)
Parameters:
Return type:

bool

GOffice.quad_matrix_multiplyl(C, A, B)
Parameters:
GOffice.quad_matrix_transposel(A, B)
Parameters:
GOffice.quad_mul(a, b)
Parameters:
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:
  • x (float) – double precision GOffice.value
  • y (float) – double precision GOffice.value
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:
Returns:

result location

Return type:

res: GOffice.Quadl

This function multiplies a and b, storing the result in res.

GOffice.quad_pow(x, y)
Parameters:
Returns:

res:result location
exp2:(allow-none): power-of-2 result scaling location

Return type:

(res: GOffice.Quad, exp2: float)

This function computes x to the power of y, storing the result in res. If the optional exp2 is supplied, it is used to return a power of 2 by which the result should be scaled. This is useful to represent results much, much bigger than double precision can handle.

GOffice.quad_qr_determinantl(qr, det)
Parameters:
GOffice.quad_qr_freel(qr)
Parameters:qr (GOffice.QuadQRl) –
GOffice.quad_qr_mark_degeneratel(qr, i)
Parameters:
GOffice.quad_qr_multiply_qtl(qr, x)
Parameters:
GOffice.quad_qr_rl(qr)
Parameters:qr (GOffice.QuadQRl) –
Return type:GOffice.QuadMatrixl
GOffice.quad_sin(a)
Parameters:a (GOffice.Quad) – quad-precision GOffice.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-precision GOffice.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-precision GOffice.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-precision GOffice.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-precision GOffice.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-precision GOffice.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:object or None

Initializes GOffice.Quad arithmetic. Any use of GOffice.Quad must occur between calls to GOffice.Quad.start() and GOffice.Quad.end().

GOffice.quad_startl()
Returns:a pointer to pass to GOffice.Quad.endl() when done.
Return type:object or None

Initializes GOffice.Quadl arithmetic. Any use of GOffice.Quadl must occur between calls to GOffice.Quad.startl() and GOffice.Quad.endl().

GOffice.quad_sub(a, b)
Parameters:
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:
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)
Parameters:
Return type:

float

GOffice.range_average(xs, n, res)
Parameters:
Return type:

int

GOffice.range_constant(xs, n)
Parameters:
Return type:

int

GOffice.range_decreasing(xs, n)
Parameters:
Return type:

int

GOffice.range_devsq(xs, n, res)
Parameters:
Return type:

int

GOffice.range_fractile_inter(xs, n, res, f)
Parameters:
Return type:

int

GOffice.range_fractile_inter_nonconst(xs, n, res, f)
Parameters:
Return type:

int

GOffice.range_fractile_inter_sorted(xs, n, res, f)
Parameters:
Return type:

int

GOffice.range_increasing(xs, n)
Parameters:
Return type:

int

GOffice.range_max(xs, n, res)
Parameters:
Return type:

int

GOffice.range_maxabs(xs, n, res)
Parameters:
Return type:

int

GOffice.range_median_inter(xs, n, res)
Parameters:
Return type:

int

GOffice.range_median_inter_nonconst(xs, n, res)
Parameters:
Return type:

int

GOffice.range_median_inter_sorted(xs, n, res)
Parameters:
Return type:

int

GOffice.range_min(xs, n, res)
Parameters:
Return type:

int

GOffice.range_sort(xs, n)
Parameters:
Return type:

float

GOffice.range_sum(xs, n, res)
Parameters:
Return type:

int

GOffice.range_sumsq(xs, n, res)
Parameters:
Return type:

int

GOffice.range_vary_uniformly(xs, n)
Parameters:
Return type:

int

GOffice.regcomp(preg, pattern, cflags)
Parameters:
Return type:

int

GOffice.regerror(errcode, preg, errbuf, errbuf_size)
Parameters:
Return type:

int

GOffice.regexec(preg, string, nmatch, pmatch, eflags)
Parameters:
Return type:

int

GOffice.regexp_quote(target, s)
Parameters:
GOffice.regexp_quote1(target, s)
Parameters:
Return type:

str

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.go_regression_stat_tl
GOffice.render_general(layout, str, measure, metrics, val, col_width, unicode_minus, numeral_shape, custom_shape_flags)
Parameters:
  • layout (Pango.Layout) – Optional Pango.Layout, probably preseeded with GOffice.font attribute.
  • str (GLib.String) – a GLib.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-point GOffice.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.rint(x)
Parameters:x (float) –
Return type:float
GOffice.rsm_lookup(id, len)
Parameters:
  • id (str) – resource name
  • len (int) – where to store the resource size in bytes
Returns:

the resource or None if not found

Return type:

object or None

GOffice.rsm_register_file(id, data, len)
Parameters:
GOffice.rsm_unregister_file(id)
Parameters:id (str) –
GOffice.search_match_string(sr, src)
Parameters:
Return type:

bool

GOffice.set_file_permissions(uri, file_permissions)
Parameters:
GOffice.setlocale(category, val)
Parameters:
  • category (int) –
  • val (str) –
Return type:

str

GOffice.shell_arg_to_uri(arg)
Parameters:arg (str) –
Return type:str
GOffice.shell_argv_to_glib_encoding(argc, argv)
Parameters:
  • argc (int) – arguments number
  • argv (str) – command line arguments
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)
Parameters:x (float) – a number
Returns:the sine of Pi times x, but with less error than doing the multiplication outright.
Return type:float
GOffice.stern_brocot(val, max_denom, res_num, res_denom)
Parameters:
  • val (float) –
  • max_denom (int) –
  • res_num (int) –
  • res_denom (int) –
GOffice.str_compare(x, y)
Parameters:
Return type:

int

GOffice.strescape(target, str)
Parameters:
GOffice.string_ERROR()
Returns:A string saying ‘ERROR’ but does not add a ref to it.
Return type:GOffice.String

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:
GOffice.string_append_gstring(target, src)
Parameters:
GOffice.string_cmp(gstr_a, gstr_b)
Parameters:
Return type:

int

GOffice.string_cmp_ignorecase(gstr_a, gstr_b)
Parameters:
Return type:

int

GOffice.string_equal(gstr_a, gstr_b)
Parameters:
Return type:

bool

GOffice.string_equal_ignorecase(gstr_a, gstr_b)
Parameters:
Returns:

True if the two strings are equal when ignoring letter case.

Return type:

bool

GOffice.string_equal_rich(gstr_a, gstr_b)
Parameters:
Return type:

bool

GOffice.string_foreach_base(callback, *data)
Parameters:

Iterates through the strings data base and apply callback to each.

GOffice.string_hash(gstr)
Parameters:gstr (object or None) –
Return type:int
GOffice.string_replace(target, pos, oldlen, txt, newlen)
Parameters:
GOffice.strsplit_to_slist(str, delimiter)
Parameters:
  • str (str) – String to split
  • delimiter (int) – Token delimiter
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, end)
Parameters:
Return type:

float

GOffice.strunescape(target, str)
Parameters:
Return type:

str

GOffice.sub_epsilon(x)
Parameters:x (float) –
Return type:float
GOffice.sys_data_dir()
Return type:str
GOffice.sys_extern_plugin_dir()
Return type:str
GOffice.sys_icon_dir()
Return type:str
GOffice.sys_lib_dir()
Return type:str
GOffice.tanpi(x)
Parameters:x (float) – a number
Returns:the tangent of Pi times x, but with less error than doing the multiplication outright.
Return type:float
GOffice.trunc(x)
Parameters:x (float) –
Return type:float
GOffice.unichar_issign(uc)
Parameters:uc (str) –
Return type:int
GOffice.unit_define(symbol, dim, factor_to_SI)
Parameters:
  • symbol (str) – symbol name for unit.
  • dim (str) – dimension measured by unit.
  • factor_to_SI (float) – factor to convert to SI unit.
Returns:

the named GOffice.Unit. If a GOffice.Unit of that name already exists, the existing is returned. Otherwise a new one is created.

Return type:

GOffice.Unit

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 or None
GOffice.unit_get_from_symbol(symbol)
Parameters:symbol (str) –
Return type:GOffice.Unit
GOffice.url_check_extension(uri, std_ext)
Parameters:
  • uri (str) – Uri
  • std_ext (str) – Standard extension for the content type
Returns:

False if the uri has an extension not matching std_ext

new_uri:New uri

Return type:

(bool, new_uri: str or None)

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:
  • uri (str) – The uri part to be encoded
  • type (int) – 0: mailto, 1: file or http
Returns:

an encoded string which the caller is responsible for freeing.

Return type:

str

url-encode a string according to RFC 2368.

GOffice.url_make_relative(uri, ref_uri)
Parameters:
  • uri (str) –
  • ref_uri (str) –
Return type:

str

GOffice.url_resolve_relative(ref_uri, rel_uri)
Parameters:
  • ref_uri (str) –
  • rel_uri (str) –
Return type:

str

GOffice.url_simplify(uri)
Parameters:uri (str) –
Return type:str
GOffice.utf8_collate_casefold(a, b)
Parameters:
Return type:

int

GOffice.utf8_strcapital(p, len)
Parameters:
  • p (str) – pointer to UTF-8 string
  • len (int) – length in bytes, or -1.
Returns:

newly allocated string.

Return type:

str

Similar to GLib.utf8_strup and GLib.utf8_strup, except that this function creates a string “Very Much Like: This, One”.

GOffice.uuid()
Returns:A string with RFC41122 version 4 random UUID, must be freed with _free().
Return type:str

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:
Return type:

bool

GOffice.xml_node_get_double(node, name, result)
Parameters:
Return type:

bool

GOffice.xml_node_get_enum(node, name, etype, val)
Parameters:
Return type:

bool

GOffice.xml_node_get_gocolor(node, name, result)
Parameters:
Return type:

bool

GOffice.xml_node_get_int(node, name, result)
Parameters:
Return type:

bool

GOffice.xml_node_set_bool(node, name, val)
Parameters:
GOffice.xml_node_set_cstr(node, name, val)
Parameters:
GOffice.xml_node_set_double(node, name, val, precision)
Parameters:
GOffice.xml_node_set_enum(node, name, etype, val)
Parameters:
GOffice.xml_node_set_gocolor(node, name, val)
Parameters:
GOffice.xml_node_set_int(node, name, val)
Parameters:
GOffice.xml_out_add_color(out, id, c)
Parameters:
GOffice.xml_out_add_double(output, id, d)
Parameters:

Output a representation of d that will be read back without loss of precision.