The Gnome Chemistry Utils
0.14.0
|
#include <gtk/gtk.h>
Go to the source code of this file.
Macros | |
#define | GCU_DISPLAY_3D (gcu_display3d_get_type ()) |
#define | GCU_TYPE_CHEM3D_VIEWER (gcu_chem3d_viewer_get_type ()) |
#define | GCU_CHEM3D_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCU_TYPE_CHEM3D_VIEWER, GcuChem3DViewer)) |
#define | GCU_CHEM3D_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCU_TYPE_CHEM3D_VIEWER, GcuChem3DViewerClass)) |
#define | GCU_IS_CHEM3D_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCU_TYPE_CHEM3D_VIEWER)) |
#define | GCU_IS_CHEM3D_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCU_TYPE_CHEM3D_VIEWER)) |
#define | GCU_CHEM3D_VIEWER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CHEM3D_VIEWER, GcuChem3DViewerClass)) |
Typedefs | |
typedef struct _GcuChem3DViewer | GcuChem3DViewer |
typedef struct _GcuChem3DViewerClass | GcuChem3DViewerClass |
Functions | |
GtkWidget * | gcu_chem3d_viewer_new (const gchar *uri) |
void | gcu_chem3d_viewer_set_uri_with_mime_type (GcuChem3DViewer *viewer, const gchar *uri, const gchar *mime_type) |
void | gcu_chem3d_viewer_set_uri (GcuChem3DViewer *viewer, const gchar *uri) |
void | gcu_chem3d_viewer_set_data (GcuChem3DViewer *viewer, const gchar *data, const gchar *mime_type, size_t size) |
GdkPixbuf * | gcu_chem3d_viewer_new_pixbuf (GcuChem3DViewer *viewer, guint width, guint height, gboolean use_bg) |
Declaration of the GcuChem3DViewer widget.
Definition in file gcuchem3dviewer.h.
#define GCU_CHEM3D_VIEWER | ( | obj | ) | (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCU_TYPE_CHEM3D_VIEWER, GcuChem3DViewer)) |
Casts obj to a GcuChem3DViewer * pointer.
Definition at line 48 of file gcuchem3dviewer.h.
#define GCU_CHEM3D_VIEWER_CLASS | ( | klass | ) | (G_TYPE_CHECK_CLASS_CAST ((klass), GCU_TYPE_CHEM3D_VIEWER, GcuChem3DViewerClass)) |
Casts klass to a GcuChem3DViewerClass * pointer.
Definition at line 53 of file gcuchem3dviewer.h.
#define GCU_CHEM3D_VIEWER_GET_CLASS | ( | obj | ) | (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CHEM3D_VIEWER, GcuChem3DViewerClass)) |
Definition at line 66 of file gcuchem3dviewer.h.
#define GCU_DISPLAY_3D (gcu_display3d_get_type ()) |
Definition at line 39 of file gcuchem3dviewer.h.
#define GCU_IS_CHEM3D_VIEWER | ( | obj | ) | (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCU_TYPE_CHEM3D_VIEWER)) |
Definition at line 57 of file gcuchem3dviewer.h.
#define GCU_IS_CHEM3D_VIEWER_CLASS | ( | klass | ) | (G_TYPE_CHECK_CLASS_TYPE ((klass), GCU_TYPE_CHEM3D_VIEWER)) |
Definition at line 61 of file gcuchem3dviewer.h.
#define GCU_TYPE_CHEM3D_VIEWER (gcu_chem3d_viewer_get_type ()) |
Definition at line 42 of file gcuchem3dviewer.h.
typedef struct _GcuChem3DViewer GcuChem3DViewer |
The GcuChem3DViewer widget.
Definition at line 91 of file gcuchem3dviewer.h.
typedef struct _GcuChem3DViewerClass GcuChem3DViewerClass |
The GcuChem3DViewer widget object class.
Definition at line 93 of file gcuchem3dviewer.h.
GtkWidget* gcu_chem3d_viewer_new | ( | const gchar * | uri | ) |
uri,: | the URI of the file containing the molecular structure to display. Any file supported by OpenBabel may be used. |
Creates a GcuChem3DViewer widget and fills it with the data from uri. If uri is NULL, the widget will be empty.
Referenced by main().
GdkPixbuf* gcu_chem3d_viewer_new_pixbuf | ( | GcuChem3DViewer * | viewer, |
guint | width, | ||
guint | height, | ||
gboolean | use_bg | ||
) |
viewer | a pointer to a GcuChem3DViewer widget. |
width | the width of the new pixbuf. |
height | the height of the new pixbuf. |
use_bg | whether to use the window background or a transparent background. |
Renders the scene to a newly allocated pixbuf.
void gcu_chem3d_viewer_set_data | ( | GcuChem3DViewer * | viewer, |
const gchar * | data, | ||
const gchar * | mime_type, | ||
size_t | size | ||
) |
viewer | a pointer to GcuChem3DViewer widget. |
data | a pointer to the raw data representing a serialized version of molecule to display |
mime_type | the mime_type of the data. Any type supported by OpenBabel may be used. |
size | the data size. |
Changes the molecule displayed by the one described in the data. Nothing happens if data or mime-type is NULL.
void gcu_chem3d_viewer_set_uri | ( | GcuChem3DViewer * | viewer, |
const gchar * | uri | ||
) |
viewer | a pointer to GcuChem3DViewer widget. |
uri | the URI of the file containing the molecular structure to display. OpenBabel may be used. |
Changes the molecule displayed by the one described in the uri. Nothing happens if uri is NULL.
void gcu_chem3d_viewer_set_uri_with_mime_type | ( | GcuChem3DViewer * | viewer, |
const gchar * | uri, | ||
const gchar * | mime_type | ||
) |
viewer | a pointer to GcuChem3DViewer widget. |
uri | the URI of the file containing the molecular structure to display. Any file supported by |
mime_type,: | the mime_type of the data. Any type supported by OpenBabel may be used. |
Changes the molecule displayed by the one described in the uri. Nothing happens if uri is NULL.