medit/moo/plugins/usertools/moousertools.h

77 lines
2.3 KiB
C
Raw Normal View History

/*
* moousertools.h
*
2010-12-21 20:15:45 -08:00
* Copyright (C) 2004-2010 by Yevgen Muntyan <emuntyan@users.sourceforge.net>
*
* This file is part of medit. medit is free software; you can
* redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the
* Free Software Foundation; either version 2.1 of the License,
* or (at your option) any later version.
*
* You should have received a copy of the GNU Lesser General Public
* License along with medit. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MOO_USER_TOOLS_H
#define MOO_USER_TOOLS_H
#include <mooutils/moouixml.h>
2010-08-30 22:19:58 -07:00
#include "moocommand.h"
G_BEGIN_DECLS
2009-11-01 12:44:46 -08:00
#define MOO_USER_TOOLS_PLUGIN_ID "UserTools"
2006-08-17 23:53:34 -05:00
#define MOO_TYPE_USER_TOOL_INFO (_moo_user_tool_info_get_type ())
2006-08-16 20:27:19 -05:00
typedef enum {
2006-08-17 23:53:34 -05:00
MOO_USER_TOOL_MENU,
MOO_USER_TOOL_CONTEXT
} MooUserToolType;
2006-08-16 20:27:19 -05:00
typedef enum {
2006-08-17 23:53:34 -05:00
MOO_USER_TOOL_POS_END,
MOO_USER_TOOL_POS_START
} MooUserToolPosition;
2006-08-16 20:27:19 -05:00
typedef struct {
2006-08-22 23:22:32 -05:00
char *id;
2006-08-17 23:53:34 -05:00
char *name;
char *accel;
char *menu;
2007-09-02 15:42:17 -05:00
char *filter;
2006-08-17 23:53:34 -05:00
char *options;
MooUserToolPosition position;
MooCommandFactory *cmd_factory;
2006-08-17 23:53:34 -05:00
MooCommandData *cmd_data;
MooUserToolType type;
char *file;
2006-08-23 02:41:56 -05:00
guint ref_count : 29;
guint enabled : 1;
guint deleted : 1;
guint builtin : 1;
2006-08-17 23:53:34 -05:00
} MooUserToolInfo;
GType _moo_user_tool_info_get_type (void) G_GNUC_CONST;
MooUserToolInfo *_moo_user_tool_info_new (void);
void _moo_user_tool_info_unref (MooUserToolInfo *info);
void _moo_edit_load_user_tools (void);
void _moo_edit_load_user_tools_type (MooUserToolType type);
2006-08-17 23:53:34 -05:00
typedef void (*MooToolFileParseFunc) (MooUserToolInfo *info,
2006-08-16 20:27:19 -05:00
gpointer data);
2006-08-19 00:21:29 -05:00
/* caller must free the list and unref() the contents */
GSList *_moo_edit_parse_user_tools (MooUserToolType type,
gboolean all);
2006-08-17 23:53:34 -05:00
void _moo_edit_save_user_tools (MooUserToolType type,
2006-08-23 02:41:56 -05:00
GSList *user_info);
2006-04-20 03:57:05 -05:00
G_END_DECLS
#endif /* MOO_USER_TOOLS_H */