|  |  |  | Anjuta Developers Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Prerequisites | Signals | ||||
#include <libanjuta/interfaces/ianjuta-project-manager.h> #define IANJUTA_PROJECT_MANAGER_ERROR #define IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI #define IANJUTA_PROJECT_MANAGER_CURRENT_URI IAnjutaProjectManager; IAnjutaProjectManagerIface; GQuark ianjuta_project_manager_error_quark (void); GFile* ianjuta_project_manager_add_group (IAnjutaProjectManager *obj,const gchar *name,GFile *default_group,GError **err); GFile* ianjuta_project_manager_add_source (IAnjutaProjectManager *obj,const gchar *name,GFile *default_target,GError **err); GFile* ianjuta_project_manager_add_source_quiet (IAnjutaProjectManager *obj,const gchar *name,GFile *target,GError **err); GList* ianjuta_project_manager_add_sources (IAnjutaProjectManager *obj,GList *names,GFile *default_target,GError **err); GFile* ianjuta_project_manager_add_target (IAnjutaProjectManager *obj,const gchar *name,GFile *default_group,GError **err); guint ianjuta_project_manager_get_capabilities (IAnjutaProjectManager *obj,GError **err); GList* ianjuta_project_manager_get_children (IAnjutaProjectManager *obj,GFile *element,GError **err); GList* ianjuta_project_manager_get_elements (IAnjutaProjectManager *obj,AnjutaProjectNodeType element_type,GError **err); GList* ianjuta_project_manager_get_packages (IAnjutaProjectManager *obj,GError **err); GFile* ianjuta_project_manager_get_parent (IAnjutaProjectManager *obj,GFile *element,GError **err); GFile* ianjuta_project_manager_get_selected (IAnjutaProjectManager *obj,GError **err); AnjutaProjectTargetClass ianjuta_project_manager_get_target_type (IAnjutaProjectManager *obj,GFile *target,GError **err); GList* ianjuta_project_manager_get_targets (IAnjutaProjectManager *obj,AnjutaProjectTargetClass target_type,GError **err); gboolean ianjuta_project_manager_is_open (IAnjutaProjectManager *obj,GError **err);
#define IANJUTA_PROJECT_MANAGER_ERROR ianjuta_project_manager_error_quark()
#define IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI "project_root_uri"
Anjuta shell value set by project manager to the project root uri.
#define IANJUTA_PROJECT_MANAGER_CURRENT_URI "project_manager_current_uri"
Anjuta shell value set by project manager to the current uri.
typedef struct {
	GTypeInterface g_iface;
	
	/* Signal */
	void (*element_added) (IAnjutaProjectManager *obj, GFile *element);
	/* Signal */
	void (*element_removed) (IAnjutaProjectManager *obj, GFile *element);
	/* Signal */
	void (*element_selected) (IAnjutaProjectManager *obj, GFile *element);
	GFile* (*add_group) (IAnjutaProjectManager *obj, const gchar *name,  GFile *default_group, GError **err);
	GFile* (*add_source) (IAnjutaProjectManager *obj, const gchar *name,  GFile *default_target, GError **err);
	GFile* (*add_source_quiet) (IAnjutaProjectManager *obj, const gchar *name,  GFile *target, GError **err);
	GList* (*add_sources) (IAnjutaProjectManager *obj, GList* names,  GFile *default_target, GError **err);
	GFile* (*add_target) (IAnjutaProjectManager *obj, const gchar *name,  GFile *default_group, GError **err);
	guint (*get_capabilities) (IAnjutaProjectManager *obj, GError **err);
	GList* (*get_children) (IAnjutaProjectManager *obj, GFile *element, GError **err);
	GList* (*get_elements) (IAnjutaProjectManager *obj, AnjutaProjectNodeType element_type, GError **err);
	GList* (*get_packages) (IAnjutaProjectManager *obj, GError **err);
	GFile* (*get_parent) (IAnjutaProjectManager *obj, GFile *element, GError **err);
	GFile* (*get_selected) (IAnjutaProjectManager *obj, GError **err);
	AnjutaProjectTargetClass (*get_target_type) (IAnjutaProjectManager *obj, GFile *target, GError **err);
	GList* (*get_targets) (IAnjutaProjectManager *obj, AnjutaProjectTargetClass target_type, GError **err);
	gboolean (*is_open) (IAnjutaProjectManager *obj, GError **err);
} IAnjutaProjectManagerIface;
GFile* ianjuta_project_manager_add_group (IAnjutaProjectManager *obj,const gchar *name,GFile *default_group,GError **err);
Prompts the user to add a new group to the project. The user can select a parent group different from the one set as default.
| 
 | Self. | 
| 
 | Group name or URI. | 
| 
 | A GFile corresponding to the default parent group or NULLif don't care. | 
| 
 | Error propagation and reporting. | 
| Returns : | A GFile corresponding to the new group added in the project.
You own the returned file; use g_object_unref()to release it. | 
GFile* ianjuta_project_manager_add_source (IAnjutaProjectManager *obj,const gchar *name,GFile *default_target,GError **err);
Prompts the user to add a file to the project. If the user selects multiple files only the first source file is returned.
You can add non existing file. In this case the element_added signal will be emitted with a non existing file. So it is up to the caller to reemit this signal later when the file is created.
| 
 | Self. | 
| 
 | Source name or URI. | 
| 
 | A GFile corresponding to the default target or group or NULLif you don't care. | 
| 
 | Error propagation and reporting. | 
| Returns : | A GFile corresponding to the new source file in the project
view. You own the returned file; use g_object_unref()to release it. | 
GFile* ianjuta_project_manager_add_source_quiet (IAnjutaProjectManager *obj,const gchar *name,GFile *target,GError **err);
Adds a file to the project without prompting the user.
You can add non existing file. In this case the element_added signal will be emitted with a non existing file. So it is up to the caller to reemit this signal later when the file is created.
| 
 | Self. | 
| 
 | Source name or URI. | 
| 
 | A GFile corresponding to the parent target or group. | 
| 
 | Error propagation and reporting. | 
| Returns : | A GFile corresponding to the new source file in the project
view. You own the returned file; use g_object_unref()to release it. | 
GList* ianjuta_project_manager_add_sources (IAnjutaProjectManager *obj,GList *names,GFile *default_target,GError **err);
Prompts the user to add several files to the project. Depending on the project backend, it can be possible that the source files must be located in a particular directory.
You can add non existing file. In this case the element_added signal will be emitted with a non existing file. So it is up to the caller to reemit this signal later when the file is created.
| 
 | Self. | 
| 
 | Sources name or URI to add. | 
| 
 | A GFile corresponding to the default target or group or NULLif don't care. | 
| 
 | Error propagation and reporting. | 
| Returns : | A list of GFile corresponding to all new source files added
in the project. You own the list with the the returned files; use g_list_free()andg_object_unref()on each file to release them. | 
GFile* ianjuta_project_manager_add_target (IAnjutaProjectManager *obj,const gchar *name,GFile *default_group,GError **err);
Prompts the user to add a new target to the project. The user can select a parent group different from the one set as default.
| 
 | Self | 
| 
 | Target name or URI. | 
| 
 | A GFile corresponding to the default parent group or NULLif don't care. | 
| 
 | Error propagation and reporting. | 
| Returns : | A GFile corresponding to the new target added in the project.
You own the returned file; use g_object_unref()to release it. | 
guint ianjuta_project_manager_get_capabilities (IAnjutaProjectManager *obj,GError **err);
Gets the capabilites of project whether it can add group, target sources etc.
| 
 | Self | 
| 
 | Error propagation and reporting. | 
| Returns : | Supported capabilites. | 
GList* ianjuta_project_manager_get_children (IAnjutaProjectManager *obj,GFile *element,GError **err);
Gets the list of all children of the corresponding parent.
| 
 | Self | 
| 
 | A GFile corresponding to a parent. | 
| 
 | Error propagation and reporting. | 
| Returns : | The list of GFile corresponding to each child of the element or NULLif the element has no child. Free the returned list withg_list_free()and the files withg_object_unref(). | 
GList* ianjuta_project_manager_get_elements (IAnjutaProjectManager *obj,AnjutaProjectNodeType element_type,GError **err);
Get a list of all elements of this type in the project.
| 
 | Self | 
| 
 | Select one element type: source, group or target | 
| 
 | Error propagation and reporting. | 
| Returns : | Get list of GFile corresponding to all valid elements or NULLif
there are no elements of this type. Free the returned list withg_list_free()and the files withg_object_unref(). | 
GList* ianjuta_project_manager_get_packages (IAnjutaProjectManager *obj,GError **err);
| 
 | |
| 
 | |
| Returns : | 
GFile* ianjuta_project_manager_get_parent (IAnjutaProjectManager *obj,GFile *element,GError **err);
Gets the parent of the corresponding child.
GFile* ianjuta_project_manager_get_selected (IAnjutaProjectManager *obj,GError **err);
Gets the currently selected element in the project manager view.
| 
 | Self | 
| 
 | Error propagation and reporting. | 
| Returns : | A GFile corresponding to the selected element in the project
view. You own the returned file; use g_object_unref()to release it. | 
AnjutaProjectTargetClass ianjuta_project_manager_get_target_type (IAnjutaProjectManager *obj,GFile *target,GError **err);
Get the type of the corresponding target: program, library...
| 
 | Self | 
| 
 | A GFile corresponding to a target | 
| 
 | Error propagation and reporting. | 
| Returns : | Return the type of the target. | 
GList* ianjuta_project_manager_get_targets (IAnjutaProjectManager *obj,AnjutaProjectTargetClass target_type,GError **err);
Get a list of targets in the project with the corresponding type.
| 
 | Self | 
| 
 | type of the target | 
| 
 | Error propagation and reporting. | 
| Returns : | A list of GFile corresponding to each target of the requested
type or NULLif none exists. Free the returned list withg_list_free()and the files withg_object_unref(). | 
gboolean ianjuta_project_manager_is_open (IAnjutaProjectManager *obj,GError **err);
Gets whether a project is currently opened.
| 
 | Self | 
| 
 | Error propagation and reporting. | 
| Returns : | TRUEif a project is opened. | 
"element-added" signalvoid user_function (IAnjutaProjectManager *ianjutaprojectmanager, GObject *arg1, gpointer user_data) : Run Last
| 
 | the object which received the signal. | 
| 
 | |
| 
 | user data set when the signal handler was connected. | 
"element-removed" signalvoid user_function (IAnjutaProjectManager *ianjutaprojectmanager, GObject *arg1, gpointer user_data) : Run Last
| 
 | the object which received the signal. | 
| 
 | |
| 
 | user data set when the signal handler was connected. | 
"element-selected" signalvoid user_function (IAnjutaProjectManager *ianjutaprojectmanager, GObject *arg1, gpointer user_data) : Run Last
| 
 | the object which received the signal. | 
| 
 | |
| 
 | user data set when the signal handler was connected. |