gtr-profile-manager.h 3.59 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
/*
 * gtr-profile-manager.c
 * This file is part of gtranslator
 *
 * Copyright (C) 2010 - Ignacio Casal Quinteiro
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */


#ifndef __GTR_PROFILE_MANAGER_H__
#define __GTR_PROFILE_MANAGER_H__

#include <glib-object.h>
#include "gtr-profile.h"

G_BEGIN_DECLS

#define GTR_TYPE_PROFILE_MANAGER		(gtr_profile_manager_get_type ())
#define GTR_PROFILE_MANAGER(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), GTR_TYPE_PROFILE_MANAGER, GtrProfileManager))
#define GTR_PROFILE_MANAGER_CONST(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), GTR_TYPE_PROFILE_MANAGER, GtrProfileManager const))
#define GTR_PROFILE_MANAGER_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), GTR_TYPE_PROFILE_MANAGER, GtrProfileManagerClass))
#define GTR_IS_PROFILE_MANAGER(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTR_TYPE_PROFILE_MANAGER))
#define GTR_IS_PROFILE_MANAGER_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), GTR_TYPE_PROFILE_MANAGER))
#define GTR_PROFILE_MANAGER_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj), GTR_TYPE_PROFILE_MANAGER, GtrProfileManagerClass))

typedef struct _GtrProfileManager		GtrProfileManager;
typedef struct _GtrProfileManagerClass		GtrProfileManagerClass;

struct _GtrProfileManager
{
  GObject parent;
};

struct _GtrProfileManagerClass
{
  GObjectClass parent_class;
49 50 51 52 53 54 55 56 57 58

  void (* active_profile_changed) (GtrProfileManager *manager,
                                   GtrProfile        *profile);
  void (* profile_added) (GtrProfileManager *manager,
                          GtrProfile        *profile);
  void (* profile_removed) (GtrProfileManager *manager,
                            GtrProfile        *profile);
  void (* profile_modified) (GtrProfileManager *manager,
                             GtrProfile        *old_profile,
                             GtrProfile        *new_profile);
59 60 61 62 63 64 65 66 67 68
};

GType                  gtr_profile_manager_get_type           (void) G_GNUC_CONST;

GtrProfileManager     *gtr_profile_manager_get_default        (void);

GSList                *gtr_profile_manager_get_profiles       (GtrProfileManager *manager);

GtrProfile            *gtr_profile_manager_get_active_profile (GtrProfileManager *manager);

69 70 71
void                   gtr_profile_manager_set_active_profile (GtrProfileManager *manager,
                                                               GtrProfile        *profile);

72 73 74
void                   gtr_profile_manager_add_profile        (GtrProfileManager *manager,
                                                               GtrProfile        *profile);

75 76 77 78 79 80
void                   gtr_profile_manager_remove_profile     (GtrProfileManager *manager,
                                                               GtrProfile        *profile);

void                   gtr_profile_manager_modify_profile     (GtrProfileManager *manager,
                                                               GtrProfile        *old_profile,
                                                               GtrProfile        *new_profile);
81 82 83 84

G_END_DECLS

#endif /* __GTR_PROFILE_MANAGER_H__ */