GOComponent

GOComponent

Synopsis

enum                GOSnapshotType;
                    GOComponent;
                    GOComponentClass;
GOComponent *       go_component_new_by_mime_type       (char const *mime_type);
GOComponent *       go_component_new_from_uri           (char const *uri);
void                go_component_set_default_size       (GOComponent *component,
                                                         double width,
                                                         double ascent,
                                                         double descent);
void                go_component_set_window             (GOComponent *component,
                                                         GdkWindow *window);
void                go_component_set_data               (GOComponent *component,
                                                         char const *data,
                                                         int length);
gboolean            go_component_get_data               (GOComponent *component,
                                                         gpointer *data,
                                                         int *length,
                                                         GDestroyNotify *clearfunc,
                                                         gpointer *user_data);
void                go_component_set_size               (GOComponent *component,
                                                         double width,
                                                         double height);
gboolean            go_component_is_resizable           (GOComponent *component);
gboolean            go_component_is_editable            (GOComponent *component);
GtkWindow*          go_component_edit                   (GOComponent *component);
void                go_component_emit_changed           (GOComponent *component);
void                go_component_set_command_context    (GOCmdContext *cc);
GOCmdContext *      go_component_get_command_context    (void);
void                go_component_render                 (GOComponent *component,
                                                         cairo_t *cr,
                                                         double width,
                                                         double height);
void                go_component_get_size               (GOComponent *component,
                                                         double *width,
                                                         double *height);
void                go_component_write_xml_sax          (GOComponent *component,
                                                         GsfXMLOut *output);
void                (*GOComponentSaxHandler)            (GOComponent *component,
                                                         gpointer user_data);
void                go_component_sax_push_parser        (GsfXMLIn *xin,
                                                         xmlChar const **attrs,
                                                         GOComponentSaxHandler handler,
                                                         gpointer user_data);
GOSnapshotType      go_component_build_snapshot         (GOComponent *component);

Object Hierarchy

  GObject
   +----GOComponent

Properties

  "ascent"                   gdouble               : Read / Write
  "descent"                  gdouble               : Read / Write
  "height"                   gdouble               : Read
  "mime-type"                gchar*                : Read / Write / Construct Only
  "width"                    gdouble               : Read / Write

Signals

  "changed"                                        : Run Last

Description

Details

enum GOSnapshotType

typedef enum {
	GO_SNAPSHOT_NONE,
	GO_SNAPSHOT_SVG,
	GO_SNAPSHOT_PNG,
	GO_SNAPSHOT_MAX
} GOSnapshotType;


GOComponent

typedef struct _GOComponent GOComponent;


GOComponentClass

typedef struct {
	GObjectClass parent_class;

	GtkWindow* (*edit) (GOComponent *component);
	gboolean (*get_data) (GOComponent *component, gpointer *data, int *length,
			      GDestroyNotify *clearfunc, gpointer *user_data);
	void (*mime_type_set) (GOComponent* component);
	void (*set_data) (GOComponent *component);
	void (*set_default_size) (GOComponent* component);
	void (*set_size) (GOComponent *component);
	void (*render) (GOComponent *component, cairo_t *cr,
			    double width, double height);
	void (*set_font) (GOComponent *component, PangoFontDescription *desc);
	void (*reserved1) (void);
	void (*reserved2) (void);
	void (*reserved3) (void);
	void (*reserved4) (void);

	/* signals */
	void (*changed) (GOComponent* component);
	void (*reserved_signal1) (void);
	void (*reserved_signal2) (void);
	void (*reserved_signal3) (void);
	void (*reserved_signal4) (void);
} GOComponentClass;

The component base object class.

GObjectClass parent_class;

the parent object class.

edit ()

callback for component edition.

get_data ()

returns the data embedded in the component.

mime_type_set ()

sets the mime type.

set_data ()

sets the data embedded in the component.

set_default_size ()

sets the default size for the component.

set_size ()

sets the requested size.

render ()

displays the contents.

set_font ()

reserved1 ()

reserved2 ()

reserved3 ()

reserved4 ()

changed ()

callback called when the component contents changed.

reserved_signal1 ()

reserved_signal2 ()

reserved_signal3 ()

reserved_signal4 ()


go_component_new_by_mime_type ()

GOComponent *       go_component_new_by_mime_type       (char const *mime_type);

mime_type :

Returns :


go_component_new_from_uri ()

GOComponent *       go_component_new_from_uri           (char const *uri);

uri :

Returns :


go_component_set_default_size ()

void                go_component_set_default_size       (GOComponent *component,
                                                         double width,
                                                         double ascent,
                                                         double descent);

component :

width :

ascent :

descent :


go_component_set_window ()

void                go_component_set_window             (GOComponent *component,
                                                         GdkWindow *window);

component :

window :


go_component_set_data ()

void                go_component_set_data               (GOComponent *component,
                                                         char const *data,
                                                         int length);

component :

data :

length :


go_component_get_data ()

gboolean            go_component_get_data               (GOComponent *component,
                                                         gpointer *data,
                                                         int *length,
                                                         GDestroyNotify *clearfunc,
                                                         gpointer *user_data);

component :

data :

length :

clearfunc :

user_data :

Returns :


go_component_set_size ()

void                go_component_set_size               (GOComponent *component,
                                                         double width,
                                                         double height);

component :

width :

height :


go_component_is_resizable ()

gboolean            go_component_is_resizable           (GOComponent *component);

component :

Returns :


go_component_is_editable ()

gboolean            go_component_is_editable            (GOComponent *component);

component :

Returns :


go_component_edit ()

GtkWindow*          go_component_edit                   (GOComponent *component);

component :

Returns :


go_component_emit_changed ()

void                go_component_emit_changed           (GOComponent *component);

component :


go_component_set_command_context ()

void                go_component_set_command_context    (GOCmdContext *cc);

cc :


go_component_get_command_context ()

GOCmdContext *      go_component_get_command_context    (void);

Returns :


go_component_render ()

void                go_component_render                 (GOComponent *component,
                                                         cairo_t *cr,
                                                         double width,
                                                         double height);

component :

cr :

width :

height :


go_component_get_size ()

void                go_component_get_size               (GOComponent *component,
                                                         double *width,
                                                         double *height);

component :

width :

height :


go_component_write_xml_sax ()

void                go_component_write_xml_sax          (GOComponent *component,
                                                         GsfXMLOut *output);

component :

output :


GOComponentSaxHandler ()

void                (*GOComponentSaxHandler)            (GOComponent *component,
                                                         gpointer user_data);

component :

user_data :


go_component_sax_push_parser ()

void                go_component_sax_push_parser        (GsfXMLIn *xin,
                                                         xmlChar const **attrs,
                                                         GOComponentSaxHandler handler,
                                                         gpointer user_data);

xin :

attrs :

handler :

user_data :


go_component_build_snapshot ()

GOSnapshotType      go_component_build_snapshot         (GOComponent *component);

component :

Returns :

Property Details

The "ascent" property

  "ascent"                   gdouble               : Read / Write

Component ascent.

Allowed values: >= 0

Default value: 0


The "descent" property

  "descent"                  gdouble               : Read / Write

Component descent.

Allowed values: >= 0

Default value: 0


The "height" property

  "height"                   gdouble               : Read

Component height.

Allowed values: >= 0

Default value: 0


The "mime-type" property

  "mime-type"                gchar*                : Read / Write / Construct Only

mime type of the content of the component.

Default value: NULL


The "width" property

  "width"                    gdouble               : Read / Write

Component width.

Allowed values: >= 0

Default value: 0

Signal Details

The "changed" signal

void                user_function                      (GOComponent *gocomponent,
                                                        gpointer     user_data)        : Run Last

gocomponent :

the object which received the signal.

user_data :

user data set when the signal handler was connected.