NetSurf
|
Go to the source code of this file.
Data Structures | |
struct | SexyIconInfo |
struct | _SexyIconEntryPriv |
Macros | |
#define | ICON_MARGIN 2 |
#define | MAX_ICONS 2 |
#define | IS_VALID_ICON_ENTRY_POSITION(pos) |
Enumerations | |
enum | { ICON_PRESSED , ICON_RELEASED , LAST_SIGNAL } |
Functions | |
static void | sexy_icon_entry_editable_init (GtkEditableClass *iface) |
static void | sexy_icon_entry_finalize (GObject *obj) |
static void | sexy_icon_entry_destroy (GtkObject *obj) |
static void | sexy_icon_entry_map (GtkWidget *widget) |
static void | sexy_icon_entry_unmap (GtkWidget *widget) |
static void | sexy_icon_entry_realize (GtkWidget *widget) |
static void | sexy_icon_entry_unrealize (GtkWidget *widget) |
static void | sexy_icon_entry_size_request (GtkWidget *widget, GtkRequisition *requisition) |
static void | sexy_icon_entry_size_allocate (GtkWidget *widget, GtkAllocation *allocation) |
static gint | sexy_icon_entry_expose (GtkWidget *widget, GdkEventExpose *event) |
static gint | sexy_icon_entry_enter_notify (GtkWidget *widget, GdkEventCrossing *event) |
static gint | sexy_icon_entry_leave_notify (GtkWidget *widget, GdkEventCrossing *event) |
static gint | sexy_icon_entry_button_press (GtkWidget *widget, GdkEventButton *event) |
static gint | sexy_icon_entry_button_release (GtkWidget *widget, GdkEventButton *event) |
G_DEFINE_TYPE_EXTENDED (SexyIconEntry, sexy_icon_entry, GTK_TYPE_ENTRY, 0, G_IMPLEMENT_INTERFACE(GTK_TYPE_EDITABLE, sexy_icon_entry_editable_init)) | |
void | sexy_icon_entry_class_init (SexyIconEntryClass *klass) |
void | sexy_icon_entry_init (SexyIconEntry *entry) |
static gint | get_icon_width (SexyIconEntry *entry, SexyIconEntryPosition icon_pos) |
static void | get_borders (SexyIconEntry *entry, gint *xborder, gint *yborder) |
static void | get_text_area_size (SexyIconEntry *entry, GtkAllocation *alloc) |
static void | get_icon_allocation (SexyIconEntry *icon_entry, gboolean left, GtkAllocation *widget_alloc, GtkAllocation *text_area_alloc, GtkAllocation *allocation, SexyIconEntryPosition *icon_pos) |
static void | place_windows (SexyIconEntry *icon_entry, GtkAllocation *widget_alloc) |
static GdkPixbuf * | get_pixbuf_from_icon (SexyIconEntry *entry, SexyIconEntryPosition icon_pos) |
static void | colorshift_pixbuf (GdkPixbuf *dest, GdkPixbuf *src, int shift) |
static void | draw_icon (GtkWidget *widget, SexyIconEntryPosition icon_pos) |
static void | update_icon (GObject *obj, GParamSpec *param, SexyIconEntry *entry) |
GtkWidget * | sexy_icon_entry_new (void) |
void | sexy_icon_entry_set_icon (SexyIconEntry *entry, SexyIconEntryPosition icon_pos, GtkImage *icon) |
void | sexy_icon_entry_set_icon_highlight (SexyIconEntry *entry, SexyIconEntryPosition icon_pos, gboolean highlight) |
GtkImage * | sexy_icon_entry_get_icon (const SexyIconEntry *entry, SexyIconEntryPosition icon_pos) |
gboolean | sexy_icon_entry_get_icon_highlight (const SexyIconEntry *entry, SexyIconEntryPosition icon_pos) |
static void | clear_button_clicked_cb (SexyIconEntry *icon_entry, SexyIconEntryPosition icon_pos, int button) |
void | sexy_icon_entry_add_clear_button (SexyIconEntry *icon_entry) |
Variables | |
static GtkEntryClass * | parent_class = NULL |
static guint | signals [LAST_SIGNAL] = {0} |
#define ICON_MARGIN 2 |
Definition at line 32 of file sexy_icon_entry.c.
#define IS_VALID_ICON_ENTRY_POSITION | ( | pos | ) |
Definition at line 35 of file sexy_icon_entry.c.
#define MAX_ICONS 2 |
Definition at line 33 of file sexy_icon_entry.c.
anonymous enum |
Enumerator | |
---|---|
ICON_PRESSED | |
ICON_RELEASED | |
LAST_SIGNAL |
Definition at line 55 of file sexy_icon_entry.c.
|
static |
Definition at line 939 of file sexy_icon_entry.c.
References SEXY_ICON_ENTRY_SECONDARY.
Referenced by sexy_icon_entry_add_clear_button().
|
static |
Definition at line 510 of file sexy_icon_entry.c.
Referenced by draw_icon().
|
static |
Definition at line 556 of file sexy_icon_entry.c.
References colorshift_pixbuf(), get_pixbuf_from_icon(), height, SexyIconInfo::hovered, SexyIconInfo::icon, ICON_MARGIN, _SexyIconEntryPriv::icons, nsgtk_widget_get_realized(), _SexyIconEntry::priv, SEXY_ICON_ENTRY, width, and SexyIconInfo::window.
Referenced by sexy_icon_entry_expose().
G_DEFINE_TYPE_EXTENDED | ( | SexyIconEntry | , |
sexy_icon_entry | , | ||
GTK_TYPE_ENTRY | , | ||
0 | , | ||
G_IMPLEMENT_INTERFACE(GTK_TYPE_EDITABLE, sexy_icon_entry_editable_init) | |||
) |
|
static |
Definition at line 267 of file sexy_icon_entry.c.
Referenced by get_text_area_size().
|
static |
Definition at line 313 of file sexy_icon_entry.c.
References get_icon_width(), ICON_MARGIN, SEXY_ICON_ENTRY_PRIMARY, and SEXY_ICON_ENTRY_SECONDARY.
Referenced by place_windows().
|
static |
Definition at line 248 of file sexy_icon_entry.c.
References SexyIconInfo::icon, _SexyIconEntryPriv::icons, _SexyIconEntry::priv, and width.
Referenced by get_icon_allocation(), and sexy_icon_entry_size_request().
|
static |
Definition at line 481 of file sexy_icon_entry.c.
References SexyIconInfo::icon, _SexyIconEntryPriv::icons, and _SexyIconEntry::priv.
Referenced by draw_icon().
|
static |
Definition at line 297 of file sexy_icon_entry.c.
References get_borders().
Referenced by place_windows(), and sexy_icon_entry_expose().
|
static |
Definition at line 428 of file sexy_icon_entry.c.
References get_icon_allocation(), get_text_area_size(), ICON_MARGIN, _SexyIconEntryPriv::icons, _SexyIconEntry::priv, and SexyIconInfo::window.
Referenced by sexy_icon_entry_size_allocate().
void sexy_icon_entry_add_clear_button | ( | SexyIconEntry * | icon_entry | ) |
Definition at line 957 of file sexy_icon_entry.c.
References clear_button_clicked_cb(), _SexyIconEntryPriv::icon_released_id, nsgtk_image_new_from_stock(), NSGTK_STOCK_CLEAR, _SexyIconEntry::priv, SEXY_ICON_ENTRY, SEXY_ICON_ENTRY_SECONDARY, sexy_icon_entry_set_icon(), sexy_icon_entry_set_icon_highlight(), and SEXY_IS_ICON_ENTRY.
|
static |
Definition at line 729 of file sexy_icon_entry.c.
References SexyIconInfo::hovered, ICON_PRESSED, _SexyIconEntryPriv::icons, MAX_ICONS, parent_class, _SexyIconEntry::priv, SEXY_ICON_ENTRY, sexy_icon_entry_get_icon_highlight(), signals, update_icon(), and SexyIconInfo::window.
Referenced by sexy_icon_entry_class_init().
|
static |
Definition at line 760 of file sexy_icon_entry.c.
References height, SexyIconInfo::hovered, ICON_RELEASED, _SexyIconEntryPriv::icons, MAX_ICONS, parent_class, _SexyIconEntry::priv, SEXY_ICON_ENTRY, sexy_icon_entry_get_icon_highlight(), signals, update_icon(), width, and SexyIconInfo::window.
Referenced by sexy_icon_entry_class_init().
void sexy_icon_entry_class_init | ( | SexyIconEntryClass * | klass | ) |
Definition at line 94 of file sexy_icon_entry.c.
References ICON_PRESSED, ICON_RELEASED, parent_class, sexy_icon_entry_button_press(), sexy_icon_entry_button_release(), sexy_icon_entry_destroy(), sexy_icon_entry_enter_notify(), sexy_icon_entry_expose(), sexy_icon_entry_finalize(), sexy_icon_entry_leave_notify(), sexy_icon_entry_map(), sexy_icon_entry_realize(), sexy_icon_entry_size_allocate(), sexy_icon_entry_size_request(), sexy_icon_entry_unmap(), sexy_icon_entry_unrealize(), and signals.
|
static |
Definition at line 198 of file sexy_icon_entry.c.
References parent_class, SEXY_ICON_ENTRY, SEXY_ICON_ENTRY_PRIMARY, SEXY_ICON_ENTRY_SECONDARY, and sexy_icon_entry_set_icon().
Referenced by sexy_icon_entry_class_init().
|
static |
Definition at line 171 of file sexy_icon_entry.c.
|
static |
Definition at line 681 of file sexy_icon_entry.c.
References SexyIconInfo::hovered, _SexyIconEntryPriv::icons, MAX_ICONS, _SexyIconEntry::priv, SEXY_ICON_ENTRY, sexy_icon_entry_get_icon_highlight(), update_icon(), and SexyIconInfo::window.
Referenced by sexy_icon_entry_class_init().
|
static |
Definition at line 618 of file sexy_icon_entry.c.
References draw_icon(), get_text_area_size(), _SexyIconEntryPriv::icons, MAX_ICONS, nsgtk_widget_get_state(), nsgtk_widget_is_drawable(), parent_class, _SexyIconEntry::priv, SEXY_ICON_ENTRY, SEXY_IS_ICON_ENTRY, width, and SexyIconInfo::window.
Referenced by sexy_icon_entry_class_init().
|
static |
Definition at line 182 of file sexy_icon_entry.c.
References parent_class, _SexyIconEntry::priv, SEXY_ICON_ENTRY, and SEXY_IS_ICON_ENTRY.
Referenced by sexy_icon_entry_class_init().
GtkImage * sexy_icon_entry_get_icon | ( | const SexyIconEntry * | entry, |
SexyIconEntryPosition | icon_pos | ||
) |
Definition at line 908 of file sexy_icon_entry.c.
References SexyIconInfo::icon, _SexyIconEntryPriv::icons, IS_VALID_ICON_ENTRY_POSITION, _SexyIconEntry::priv, and SEXY_IS_ICON_ENTRY.
gboolean sexy_icon_entry_get_icon_highlight | ( | const SexyIconEntry * | entry, |
SexyIconEntryPosition | icon_pos | ||
) |
Definition at line 928 of file sexy_icon_entry.c.
References SexyIconInfo::highlight, _SexyIconEntryPriv::icons, IS_VALID_ICON_ENTRY_POSITION, _SexyIconEntry::priv, and SEXY_IS_ICON_ENTRY.
Referenced by sexy_icon_entry_button_press(), sexy_icon_entry_button_release(), sexy_icon_entry_enter_notify(), and sexy_icon_entry_leave_notify().
void sexy_icon_entry_init | ( | SexyIconEntry * | entry | ) |
Definition at line 176 of file sexy_icon_entry.c.
References _SexyIconEntry::priv.
|
static |
Definition at line 705 of file sexy_icon_entry.c.
References SexyIconInfo::hovered, _SexyIconEntryPriv::icons, MAX_ICONS, _SexyIconEntry::priv, SEXY_ICON_ENTRY, sexy_icon_entry_get_icon_highlight(), update_icon(), and SexyIconInfo::window.
Referenced by sexy_icon_entry_class_init().
|
static |
Definition at line 212 of file sexy_icon_entry.c.
References SexyIconInfo::icon, _SexyIconEntryPriv::icons, MAX_ICONS, nsgtk_widget_get_mapped(), nsgtk_widget_get_realized(), parent_class, _SexyIconEntry::priv, SEXY_ICON_ENTRY, and SexyIconInfo::window.
Referenced by sexy_icon_entry_class_init().
GtkWidget * sexy_icon_entry_new | ( | void | ) |
Definition at line 805 of file sexy_icon_entry.c.
References SEXY_TYPE_ICON_ENTRY.
Referenced by nsgtk_entry_new().
|
static |
Definition at line 344 of file sexy_icon_entry.c.
References _SexyIconEntryPriv::icons, MAX_ICONS, nsgtk_widget_get_state(), parent_class, _SexyIconEntry::priv, SEXY_ICON_ENTRY, and SexyIconInfo::window.
Referenced by sexy_icon_entry_class_init().
void sexy_icon_entry_set_icon | ( | SexyIconEntry * | entry, |
SexyIconEntryPosition | icon_pos, | ||
GtkImage * | icon | ||
) |
Definition at line 819 of file sexy_icon_entry.c.
References SexyIconInfo::icon, _SexyIconEntryPriv::icon_released_id, _SexyIconEntryPriv::icons, IS_VALID_ICON_ENTRY_POSITION, _SexyIconEntry::priv, SEXY_ICON_ENTRY_SECONDARY, SEXY_IS_ICON_ENTRY, update_icon(), and SexyIconInfo::window.
Referenced by nsgtk_entry_set_icon_from_icon_name(), nsgtk_entry_set_icon_from_pixbuf(), sexy_icon_entry_add_clear_button(), and sexy_icon_entry_destroy().
void sexy_icon_entry_set_icon_highlight | ( | SexyIconEntry * | entry, |
SexyIconEntryPosition | icon_pos, | ||
gboolean | highlight | ||
) |
Definition at line 880 of file sexy_icon_entry.c.
References SexyIconInfo::highlight, _SexyIconEntryPriv::icons, IS_VALID_ICON_ENTRY_POSITION, _SexyIconEntry::priv, and SEXY_IS_ICON_ENTRY.
Referenced by sexy_icon_entry_add_clear_button().
|
static |
Definition at line 467 of file sexy_icon_entry.c.
References nsgtk_widget_get_realized(), parent_class, place_windows(), SEXY_ICON_ENTRY, and SEXY_IS_ICON_ENTRY.
Referenced by sexy_icon_entry_class_init().
|
static |
Definition at line 403 of file sexy_icon_entry.c.
References get_icon_width(), ICON_MARGIN, MAX_ICONS, parent_class, and SEXY_ICON_ENTRY.
Referenced by sexy_icon_entry_class_init().
|
static |
Definition at line 230 of file sexy_icon_entry.c.
References SexyIconInfo::icon, _SexyIconEntryPriv::icons, MAX_ICONS, nsgtk_widget_get_mapped(), parent_class, _SexyIconEntry::priv, SEXY_ICON_ENTRY, and SexyIconInfo::window.
Referenced by sexy_icon_entry_class_init().
|
static |
Definition at line 386 of file sexy_icon_entry.c.
References _SexyIconEntryPriv::icons, MAX_ICONS, parent_class, _SexyIconEntry::priv, SEXY_ICON_ENTRY, and SexyIconInfo::window.
Referenced by sexy_icon_entry_class_init().
|
static |
Definition at line 663 of file sexy_icon_entry.c.
Referenced by sexy_icon_entry_button_press(), sexy_icon_entry_button_release(), sexy_icon_entry_enter_notify(), sexy_icon_entry_leave_notify(), and sexy_icon_entry_set_icon().
|
static |
Definition at line 85 of file sexy_icon_entry.c.
Referenced by sexy_icon_entry_button_press(), sexy_icon_entry_button_release(), sexy_icon_entry_class_init(), sexy_icon_entry_destroy(), sexy_icon_entry_expose(), sexy_icon_entry_finalize(), sexy_icon_entry_map(), sexy_icon_entry_realize(), sexy_icon_entry_size_allocate(), sexy_icon_entry_size_request(), sexy_icon_entry_unmap(), and sexy_icon_entry_unrealize().
|
static |
Definition at line 86 of file sexy_icon_entry.c.
Referenced by sexy_icon_entry_button_press(), sexy_icon_entry_button_release(), and sexy_icon_entry_class_init().