2006-05-03 23:40:54 -07:00
|
|
|
/*
|
2005-10-16 22:23:40 -07:00
|
|
|
* moolangmgr.h
|
|
|
|
*
|
2007-06-24 10:56:20 -07:00
|
|
|
* Copyright (C) 2004-2007 by Yevgen Muntyan <muntyan@math.tamu.edu>
|
2005-10-16 22:23:40 -07:00
|
|
|
*
|
2007-06-24 10:56:20 -07:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
2007-09-23 09:47:28 -07:00
|
|
|
* License version 2.1 as published by the Free Software Foundation.
|
2005-10-16 22:23:40 -07:00
|
|
|
*
|
|
|
|
* See COPYING file that comes with this distribution.
|
|
|
|
*/
|
|
|
|
|
2007-06-10 02:06:03 -07:00
|
|
|
#ifndef MOO_LANG_MGR_H
|
|
|
|
#define MOO_LANG_MGR_H
|
2005-10-16 22:23:40 -07:00
|
|
|
|
|
|
|
#include <mooedit/moolang.h>
|
2006-08-26 02:46:29 -07:00
|
|
|
#include <mooedit/mootextstylescheme.h>
|
|
|
|
#include <mooedit/mooeditconfig.h>
|
2005-10-16 22:23:40 -07:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
|
|
|
|
#define MOO_TYPE_LANG_MGR (moo_lang_mgr_get_type ())
|
|
|
|
#define MOO_LANG_MGR(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), MOO_TYPE_LANG_MGR, MooLangMgr))
|
|
|
|
#define MOO_IS_LANG_MGR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), MOO_TYPE_LANG_MGR))
|
|
|
|
|
|
|
|
typedef struct _MooLangMgr MooLangMgr;
|
|
|
|
|
2006-08-26 02:46:29 -07:00
|
|
|
|
2005-10-16 22:23:40 -07:00
|
|
|
GType moo_lang_mgr_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
MooLangMgr *moo_lang_mgr_new (void);
|
|
|
|
|
2006-08-26 02:46:29 -07:00
|
|
|
MooLang *moo_lang_mgr_get_lang (MooLangMgr *mgr,
|
|
|
|
const char *lang_id);
|
|
|
|
MooLang *moo_lang_mgr_get_lang_for_file (MooLangMgr *mgr,
|
|
|
|
const char *filename);
|
|
|
|
|
|
|
|
/* list must be freed, content unref'ed */
|
|
|
|
GSList *moo_lang_mgr_get_available_langs (MooLangMgr *mgr);
|
|
|
|
/* list must be freed together with content */
|
|
|
|
GSList *moo_lang_mgr_get_sections (MooLangMgr *mgr);
|
|
|
|
|
2006-12-04 20:55:42 -08:00
|
|
|
MooLang *_moo_lang_mgr_find_lang (MooLangMgr *mgr,
|
|
|
|
const char *name);
|
|
|
|
|
2007-06-17 22:17:05 -07:00
|
|
|
MooTextStyleScheme *moo_lang_mgr_get_active_scheme (MooLangMgr *mgr);
|
2006-08-26 02:46:29 -07:00
|
|
|
void _moo_lang_mgr_set_active_scheme (MooLangMgr *mgr,
|
|
|
|
const char *scheme_name);
|
|
|
|
/* list must be freed, content unref'ed */
|
2007-06-17 22:17:05 -07:00
|
|
|
GSList *moo_lang_mgr_list_schemes (MooLangMgr *mgr);
|
2006-08-26 02:46:29 -07:00
|
|
|
|
|
|
|
/* list must be freed together with content */
|
2006-09-06 19:06:32 -07:00
|
|
|
GSList *_moo_lang_mgr_get_globs (MooLangMgr *mgr,
|
2006-08-26 02:46:29 -07:00
|
|
|
const char *lang_id);
|
2006-05-02 21:26:05 -07:00
|
|
|
/* list must be freed together with content */
|
2006-08-26 02:46:29 -07:00
|
|
|
GSList *_moo_lang_mgr_get_mime_types (MooLangMgr *mgr,
|
|
|
|
const char *lang_id);
|
|
|
|
void _moo_lang_mgr_set_mime_types (MooLangMgr *mgr,
|
|
|
|
const char *lang_id,
|
|
|
|
const char *mime);
|
2006-09-06 19:06:32 -07:00
|
|
|
void _moo_lang_mgr_set_globs (MooLangMgr *mgr,
|
2006-08-26 02:46:29 -07:00
|
|
|
const char *lang_id,
|
2006-09-06 19:06:32 -07:00
|
|
|
const char *globs);
|
2006-08-26 02:46:29 -07:00
|
|
|
const char *_moo_lang_mgr_get_config (MooLangMgr *mgr,
|
|
|
|
const char *lang_id);
|
|
|
|
void _moo_lang_mgr_set_config (MooLangMgr *mgr,
|
|
|
|
const char *lang_id,
|
|
|
|
const char *config);
|
|
|
|
void _moo_lang_mgr_update_config (MooLangMgr *mgr,
|
|
|
|
MooEditConfig *config,
|
|
|
|
const char *lang_id);
|
|
|
|
void _moo_lang_mgr_save_config (MooLangMgr *mgr);
|
2006-08-23 18:33:03 -07:00
|
|
|
|
2005-10-16 22:23:40 -07:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2007-06-10 02:06:03 -07:00
|
|
|
#endif /* MOO_LANG_MGR_H */
|