~mterry/ubuntu/natty/gnome-shell/wip

« back to all changes in this revision

Viewing changes to src/st/st-entry.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-10-12 22:44:00 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091012224400-k91p42yvou07i525
Tags: 2.28.0-0ubuntu1
* New upstream version
* debian/control:
  - updated build requirement
* debian/patches/80_git_change_fix_alt_tab_ressource_usage.patch:
  - git change to fix ressources not being freed on alt-tab

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 
2
/*
 
3
 * st-entry.h: Plain entry actor
 
4
 *
 
5
 * Copyright 2008, 2009 Intel Corporation.
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or modify it
 
8
 * under the terms and conditions of the GNU Lesser General Public License,
 
9
 * version 2.1, as published by the Free Software Foundation.
 
10
 *
 
11
 * This program is distributed in the hope it will be useful, but WITHOUT ANY
 
12
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
13
 * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
 
14
 * more details.
 
15
 *
 
16
 * You should have received a copy of the GNU Lesser General Public License
 
17
 * along with this program; if not, write to the Free Software Foundation,
 
18
 * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
 
19
 * Boston, MA 02111-1307, USA.
 
20
 *
 
21
 * Written by: Thomas Wood <thomas@linux.intel.com>
 
22
 *
 
23
 */
 
24
 
 
25
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
 
26
#error "Only <st/st.h> can be included directly.h"
 
27
#endif
 
28
 
 
29
#ifndef __ST_ENTRY_H__
 
30
#define __ST_ENTRY_H__
 
31
 
 
32
G_BEGIN_DECLS
 
33
 
 
34
#include <st/st-widget.h>
 
35
 
 
36
#define ST_TYPE_ENTRY                (st_entry_get_type ())
 
37
#define ST_ENTRY(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), ST_TYPE_ENTRY, StEntry))
 
38
#define ST_IS_ENTRY(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ST_TYPE_ENTRY))
 
39
#define ST_ENTRY_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST ((klass), ST_TYPE_ENTRY, StEntryClass))
 
40
#define ST_IS_ENTRY_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), ST_TYPE_ENTRY))
 
41
#define ST_ENTRY_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), ST_TYPE_ENTRY, StEntryClass))
 
42
 
 
43
typedef struct _StEntry              StEntry;
 
44
typedef struct _StEntryPrivate       StEntryPrivate;
 
45
typedef struct _StEntryClass         StEntryClass;
 
46
 
 
47
/**
 
48
 * StEntry:
 
49
 *
 
50
 * The contents of this structure is private and should only be accessed using
 
51
 * the provided API.
 
52
 */
 
53
struct _StEntry
 
54
{
 
55
  /*< private >*/
 
56
  StWidget parent_instance;
 
57
 
 
58
  StEntryPrivate *priv;
 
59
};
 
60
 
 
61
struct _StEntryClass
 
62
{
 
63
  StWidgetClass parent_class;
 
64
 
 
65
  /* signals */
 
66
  void (*primary_icon_clicked)   (StEntry *entry);
 
67
  void (*secondary_icon_clicked) (StEntry *entry);
 
68
};
 
69
 
 
70
GType st_entry_get_type (void) G_GNUC_CONST;
 
71
 
 
72
StWidget *            st_entry_new              (const gchar *text);
 
73
G_CONST_RETURN gchar *st_entry_get_text         (StEntry     *entry);
 
74
void                  st_entry_set_text         (StEntry     *entry,
 
75
                                                 const gchar *text);
 
76
ClutterActor*         st_entry_get_clutter_text (StEntry     *entry);
 
77
 
 
78
void                  st_entry_set_hint_text    (StEntry     *entry,
 
79
                                                 const gchar *text);
 
80
G_CONST_RETURN gchar *st_entry_get_hint_text    (StEntry     *entry);
 
81
 
 
82
void st_entry_set_primary_icon_from_file   (StEntry     *entry,
 
83
                                            const gchar *filename);
 
84
void st_entry_set_secondary_icon_from_file (StEntry     *entry,
 
85
                                            const gchar *filename);
 
86
 
 
87
G_END_DECLS
 
88
 
 
89
#endif /* __ST_ENTRY_H__ */