Revision 2436 src/plugin.c
| plugin.c (revision 2436) | ||
|---|---|---|
| 31 | 31 |
PLUGIN_LOAD, |
| 32 | 32 |
PLUGIN_UNLOAD, |
| 33 | 33 |
FOLDERVIEW_MENU_POPUP, |
| 34 |
COMPOSE_CREATED, |
|
| 35 |
COMPOSE_DESTROY, |
|
| 34 | 36 |
LAST_SIGNAL |
| 35 | 37 |
}; |
| 36 | 38 |
|
| ... | ... | |
| 103 | 105 |
G_TYPE_NONE, |
| 104 | 106 |
1, |
| 105 | 107 |
G_TYPE_POINTER); |
| 108 |
plugin_signals[COMPOSE_CREATED] = |
|
| 109 |
g_signal_new("compose-created",
|
|
| 110 |
G_TYPE_FROM_CLASS(gobject_class), |
|
| 111 |
G_SIGNAL_RUN_FIRST, |
|
| 112 |
G_STRUCT_OFFSET(SylPluginClass, compose_created), |
|
| 113 |
NULL, NULL, |
|
| 114 |
g_cclosure_marshal_VOID__POINTER, |
|
| 115 |
G_TYPE_NONE, |
|
| 116 |
1, |
|
| 117 |
G_TYPE_POINTER); |
|
| 118 |
plugin_signals[COMPOSE_DESTROY] = |
|
| 119 |
g_signal_new("compose-destroy",
|
|
| 120 |
G_TYPE_FROM_CLASS(gobject_class), |
|
| 121 |
G_SIGNAL_RUN_FIRST, |
|
| 122 |
G_STRUCT_OFFSET(SylPluginClass, compose_destroy), |
|
| 123 |
NULL, NULL, |
|
| 124 |
g_cclosure_marshal_VOID__POINTER, |
|
| 125 |
G_TYPE_NONE, |
|
| 126 |
1, |
|
| 127 |
G_TYPE_POINTER); |
|
| 106 | 128 |
} |
| 107 | 129 |
|
| 108 | 130 |
void syl_plugin_signal_connect(const gchar *name, GCallback callback, |
| ... | ... | |
| 648 | 670 |
} |
| 649 | 671 |
} |
| 650 | 672 |
|
| 673 |
|
|
| 674 |
gpointer syl_plugin_compose_new(PrefsAccount *account, FolderItem *item, |
|
| 675 |
const gchar *mailto, GPtrArray *attach_files) |
|
| 676 |
{
|
|
| 677 |
gpointer (*func)(PrefsAccount *, FolderItem *, const gchar *, |
|
| 678 |
GPtrArray *); |
|
| 679 |
|
|
| 680 |
func = syl_plugin_lookup_symbol("compose_new");
|
|
| 681 |
return SAFE_CALL_ARG4_RET(func, account, item, mailto, attach_files); |
|
| 682 |
} |
|
| 683 |
|
|
| 684 |
void syl_plugin_compose_entry_set(gpointer compose, const gchar *text, |
|
| 685 |
gint type) |
|
| 686 |
{
|
|
| 687 |
void (*func)(gpointer, const gchar *, gint); |
|
| 688 |
|
|
| 689 |
func = syl_plugin_lookup_symbol("compose_entry_set");
|
|
| 690 |
SAFE_CALL_ARG3(func, compose, text, type); |
|
| 691 |
} |
|
| 692 |
|
|
| 693 |
void syl_plugin_compose_entry_append(gpointer compose, const gchar *text, |
|
| 694 |
gint type) |
|
| 695 |
{
|
|
| 696 |
void (*func)(gpointer, const gchar *, gint); |
|
| 697 |
|
|
| 698 |
func = syl_plugin_lookup_symbol("compose_entry_append");
|
|
| 699 |
SAFE_CALL_ARG3(func, compose, text, type); |
|
| 700 |
} |
|
| 701 |
|
|
| 702 |
gchar *syl_plugin_compose_entry_get_text(gpointer compose, gint type) |
|
| 703 |
{
|
|
| 704 |
gchar * (*func)(gpointer, gint); |
|
| 705 |
|
|
| 706 |
func = syl_plugin_lookup_symbol("compose_entry_get_text");
|
|
| 707 |
return SAFE_CALL_ARG2_RET(func, compose, type); |
|
| 708 |
} |
|
| 709 |
|
|
| 710 |
void syl_plugin_compose_lock(gpointer compose) |
|
| 711 |
{
|
|
| 712 |
void (*func)(gpointer); |
|
| 713 |
|
|
| 714 |
func = syl_plugin_lookup_symbol("compose_lock");
|
|
| 715 |
SAFE_CALL_ARG1(func, compose); |
|
| 716 |
} |
|
| 717 |
|
|
| 718 |
void syl_plugin_compose_unlock(gpointer compose) |
|
| 719 |
{
|
|
| 720 |
void (*func)(gpointer); |
|
| 721 |
|
|
| 722 |
func = syl_plugin_lookup_symbol("compose_unlock");
|
|
| 723 |
SAFE_CALL_ARG1(func, compose); |
|
| 724 |
} |
|
| 725 |
|
|
| 726 |
|
|
| 651 | 727 |
FolderItem *syl_plugin_folder_sel(Folder *cur_folder, gint sel_type, |
| 652 | 728 |
const gchar *default_folder) |
| 653 | 729 |
{
|
Also available in: Unified diff