2011-05-13 13:44:55 +01:00
|
|
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
|
|
|
|
*
|
|
|
|
* Copyright 2009-2010 Red Hat, Inc,
|
|
|
|
*
|
|
|
|
* 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
|
2012-09-06 07:43:05 -04:00
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
2011-05-13 13:44:55 +01:00
|
|
|
* (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
|
2014-01-23 12:57:27 +01:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2011-05-13 13:44:55 +01:00
|
|
|
*
|
|
|
|
* Written by: Matthias Clasen <mclasen@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _CC_EDITABLE_ENTRY_H_
|
|
|
|
#define _CC_EDITABLE_ENTRY_H_
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define CC_TYPE_EDITABLE_ENTRY cc_editable_entry_get_type()
|
|
|
|
|
|
|
|
#define CC_EDITABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CC_TYPE_EDITABLE_ENTRY, CcEditableEntry))
|
|
|
|
#define CC_EDITABLE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CC_TYPE_EDITABLE_ENTRY, CcEditableEntryClass))
|
|
|
|
#define CC_IS_EDITABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CC_TYPE_EDITABLE_ENTRY))
|
|
|
|
#define CC_IS_EDITABLE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CC_TYPE_EDITABLE_ENTRY))
|
|
|
|
#define CC_EDITABLE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CC_TYPE_EDITABLE_ENTRY, CcEditableEntryClass))
|
|
|
|
|
|
|
|
typedef struct _CcEditableEntry CcEditableEntry;
|
|
|
|
typedef struct _CcEditableEntryClass CcEditableEntryClass;
|
|
|
|
typedef struct _CcEditableEntryPrivate CcEditableEntryPrivate;
|
|
|
|
|
|
|
|
struct _CcEditableEntry
|
|
|
|
{
|
|
|
|
GtkAlignment parent;
|
|
|
|
|
|
|
|
CcEditableEntryPrivate *priv;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _CcEditableEntryClass
|
|
|
|
{
|
|
|
|
GtkAlignmentClass parent_class;
|
|
|
|
|
|
|
|
void (* editing_done) (CcEditableEntry *entry);
|
|
|
|
};
|
|
|
|
|
2011-07-15 16:08:31 +02:00
|
|
|
GType cc_editable_entry_get_type (void) G_GNUC_CONST;
|
|
|
|
GtkWidget *cc_editable_entry_new (void);
|
|
|
|
void cc_editable_entry_set_text (CcEditableEntry *entry,
|
|
|
|
const gchar *text);
|
|
|
|
const gchar *cc_editable_entry_get_text (CcEditableEntry *entry);
|
|
|
|
void cc_editable_entry_set_editable (CcEditableEntry *entry,
|
|
|
|
gboolean editable);
|
|
|
|
gboolean cc_editable_entry_get_editable (CcEditableEntry *entry);
|
|
|
|
void cc_editable_entry_set_selectable (CcEditableEntry *entry,
|
|
|
|
gboolean selectable);
|
|
|
|
gboolean cc_editable_entry_get_selectable (CcEditableEntry *entry);
|
|
|
|
void cc_editable_entry_set_weight (CcEditableEntry *entry,
|
|
|
|
gint weight);
|
|
|
|
gint cc_editable_entry_get_weight (CcEditableEntry *entry);
|
|
|
|
void cc_editable_entry_set_scale (CcEditableEntry *entry,
|
|
|
|
gdouble scale);
|
|
|
|
gdouble cc_editable_entry_get_scale (CcEditableEntry *entry);
|
2013-03-22 17:57:07 +01:00
|
|
|
void cc_editable_entry_set_width_chars (CcEditableEntry *entry,
|
|
|
|
gint n_chars);
|
|
|
|
gint cc_editable_entry_get_width_chars (CcEditableEntry *entry);
|
|
|
|
void cc_editable_entry_set_max_width_chars (CcEditableEntry *entry,
|
|
|
|
gint n_chars);
|
|
|
|
gint cc_editable_entry_get_max_width_chars (CcEditableEntry *entry);
|
|
|
|
void cc_editable_entry_set_ellipsize (CcEditableEntry *entry,
|
|
|
|
PangoEllipsizeMode mode);
|
|
|
|
PangoEllipsizeMode cc_editable_entry_get_ellipsize (CcEditableEntry *entry);
|
2011-05-13 13:44:55 +01:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* _CC_EDITABLE_ENTRY_H_ */
|