Files
evolution/shell/Evolution-ShellComponent.idl
Ettore Perazzoli 20801a94aa Add the menu items using the EShellUserCreatableItemsHandler.
* e-shell-view.c (e_shell_view_construct): Add the menu items
using the EShellUserCreatableItemsHandler.

* e-shell-user-creatable-items-handler.c: New.
* e-shell-user-creatable-items-handler.h: New.

* e-shell.c: New member `user_creatable_items_handler' in
`EShellPrivate'.
(init): Initialize to NULL.
(destroy): Unref.
(e_shell_construct): Create here.
(e_shell_get_user_creatable_items_handler): New accessor.
(setup_components): Add the registered components to the
user_creatable_items_handler.

* evolution-test-component.c (factory_fn): Add a couple sample
user-creatable items.
(user_create_new_item_callback): New callback for the
"user_create_new_item" signal on the EvolutionShellComponent.
(factory_fn): Connect.

* e-shell.c (e_shell_get_component_registry): New.

* evolution-shell-component.c: New enum value
`USER_CREATE_NEW_ITEM'.  New member `user_create_item_types' in
`_EvolutionShellComponentPrivate'.
(init): Init to NULL.
(impl_destroy): Free it.
(user_creatable_item_type_free): New helper function.
(user_creatable_item_type_new): New helper function.
(impl_userCreateNewItem): New, implementation for
::userCreateNewItem.
(class_init): Install the "user_create_new_item" signal and the
userCreateNewItem impl.
(impl__get_external_uri_schemas): Renamed from
`impl_ShellComponent__get_external_uri_schemas'.
(impl___get_supported_types): Renamed from
`impl_ShellComponent__get_supported_types'.
(impl__get_user_creatable_item_types): New, implementation for the
`user_creatable_item_types' attribute.
(class_init): Install it.
(evolution_shell_component_add_user_creatable_item): New.

* evolution-shell-component.h: Added signal
`user_create_new_item'.

* Evolution-ShellComponent.idl: Added typedefs
`UserCreatableItemType', `UserCreatableItemTypeList'.  New
attribute `user_creatable_item_types'.
(userCreateNewItem): New.

svn path=/trunk/; revision=11849
2001-08-09 23:37:56 +00:00

115 lines
2.6 KiB
Plaintext

/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Interface for the Evolution components.
*
* Authors:
* Ettore Perazzoli <ettore@ximian.com>
*
* Copyright (C) 2000, 2001 Ximian, Inc.
*/
#include <Bonobo.h>
module GNOME {
module Evolution {
interface Shell;
struct FolderType {
string name;
string icon_name;
boolean user_creatable;
sequence<string> accepted_dnd_types;
sequence<string> exported_dnd_types;
};
typedef sequence<FolderType> FolderTypeList;
typedef string URISchema;
typedef sequence<URISchema> URISchemaList;
struct UserCreatableItemType {
string id;
string description;
string menuDescription;
char menuShortcut;
};
typedef sequence<UserCreatableItemType> UserCreatableItemTypeList;
interface ShellComponentListener;
interface ShellComponent : Bonobo::Unknown {
readonly attribute FolderTypeList supported_types;
readonly attribute URISchemaList external_uri_schemas;
readonly attribute UserCreatableItemTypeList user_creatable_item_types;
/* FIXME: Can we use an attribute here? */
exception AlreadyOwned {};
void setOwner (in Shell shell, in string evolution_homedir)
raises (AlreadyOwned);
exception NotOwned {};
void unsetOwner ()
raises (NotOwned);
void debug (in string log_path);
/* FIXME: We might want more exceptions here. */
exception NotFound {};
exception UnsupportedType {};
exception UnsupportedSchema {};
exception InternalError {};
Bonobo::Control createView (in string physical_uri,
in string type)
raises (NotFound, UnsupportedType, InternalError);
void handleExternalURI (in string external_uri)
raises (NotFound, UnsupportedSchema, InternalError);
exception Busy {};
void createFolderAsync (in ShellComponentListener listener,
in string physical_uri,
in string type)
raises (Busy);
void removeFolderAsync (in ShellComponentListener listener,
in string physical_uri,
in string type)
raises (Busy);
void xferFolderAsync (in ShellComponentListener listener,
in string source_physical_uri,
in string destination_physical_uri,
in string type,
in boolean remove_source)
raises (Busy);
void populateFolderContextMenu (in Bonobo::UIContainer uih,
in string physical_uri,
in string type);
void userCreateNewItem (in string id)
raises (UnsupportedType);
};
interface ShellComponentListener {
enum Result {
OK,
UNSUPPORTED_OPERATION,
UNSUPPORTED_TYPE,
EXISTS,
INVALID_URI,
PERMISSION_DENIED,
HAS_SUBFOLDERS,
NO_SPACE
};
void notifyResult (in Result result);
};
};
};