Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtkentrybuffer.h
Go to the documentation of this file.
1/* gtkentrybuffer.h
2 * Copyright (C) 2009 Stefan Walter <stef@memberwebs.com>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19
20#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
21#error "Only <gtk/gtk.h> can be included directly."
22#endif
23
24#include <glib-object.h>
25#include <gdk/gdk.h>
26
28
29/* Maximum size of text buffer, in bytes */
30#define GTK_ENTRY_BUFFER_MAX_SIZE G_MAXUSHORT
31
32#define GTK_TYPE_ENTRY_BUFFER (gtk_entry_buffer_get_type ())
33#define GTK_ENTRY_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ENTRY_BUFFER, GtkEntryBuffer))
34#define GTK_ENTRY_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ENTRY_BUFFER, GtkEntryBufferClass))
35#define GTK_IS_ENTRY_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ENTRY_BUFFER))
36#define GTK_IS_ENTRY_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ENTRY_BUFFER))
37#define GTK_ENTRY_BUFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ENTRY_BUFFER, GtkEntryBufferClass))
38
41
46
48{
50
51 /* Signals */
52
53 void (*inserted_text) (GtkEntryBuffer *buffer,
54 guint position,
55 const char *chars,
56 guint n_chars);
57
58 void (*deleted_text) (GtkEntryBuffer *buffer,
59 guint position,
60 guint n_chars);
61
62 /* Virtual Methods */
63
64 const char * (*get_text) (GtkEntryBuffer *buffer,
65 gsize *n_bytes);
66
68
70 guint position,
71 const char *chars,
72 guint n_chars);
73
75 guint position,
76 guint n_chars);
77
78 /* Padding for future expansion */
79 void (*_gtk_reserved1) (void);
80 void (*_gtk_reserved2) (void);
81 void (*_gtk_reserved3) (void);
82 void (*_gtk_reserved4) (void);
83 void (*_gtk_reserved5) (void);
84 void (*_gtk_reserved6) (void);
85 void (*_gtk_reserved7) (void);
86 void (*_gtk_reserved8) (void);
87};
88
91
93GtkEntryBuffer* gtk_entry_buffer_new (const char *initial_chars,
94 int n_initial_chars);
95
98
101
104
107 const char *chars,
108 int n_chars);
109
112 int max_length);
113
116
119 guint position,
120 const char *chars,
121 int n_chars);
122
125 guint position,
126 int n_chars);
127
130 guint position,
131 const char *chars,
132 guint n_chars);
133
136 guint position,
137 guint n_chars);
138
140
142
#define GDK_AVAILABLE_IN_ALL
unsigned long gsize
Definition glibconfig.h:83
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func)
Definition gmacros.h:1400
GOBJECT_AVAILABLE_IN_ALL void g_object_unref(gpointer object)
GDK_AVAILABLE_IN_ALL GtkEntryBuffer * gtk_entry_buffer_new(const char *initial_chars, int n_initial_chars)
GDK_AVAILABLE_IN_ALL gsize gtk_entry_buffer_get_bytes(GtkEntryBuffer *buffer)
GDK_AVAILABLE_IN_ALL guint gtk_entry_buffer_insert_text(GtkEntryBuffer *buffer, guint position, const char *chars, int n_chars)
GDK_AVAILABLE_IN_ALL GType gtk_entry_buffer_get_type(void) G_GNUC_CONST
GDK_AVAILABLE_IN_ALL guint gtk_entry_buffer_delete_text(GtkEntryBuffer *buffer, guint position, int n_chars)
GDK_AVAILABLE_IN_ALL const char * gtk_entry_buffer_get_text(GtkEntryBuffer *buffer)
GDK_AVAILABLE_IN_ALL void gtk_entry_buffer_emit_deleted_text(GtkEntryBuffer *buffer, guint position, guint n_chars)
GDK_AVAILABLE_IN_ALL void gtk_entry_buffer_emit_inserted_text(GtkEntryBuffer *buffer, guint position, const char *chars, guint n_chars)
GDK_AVAILABLE_IN_ALL guint gtk_entry_buffer_get_length(GtkEntryBuffer *buffer)
GDK_AVAILABLE_IN_ALL void gtk_entry_buffer_set_max_length(GtkEntryBuffer *buffer, int max_length)
GDK_AVAILABLE_IN_ALL void gtk_entry_buffer_set_text(GtkEntryBuffer *buffer, const char *chars, int n_chars)
GDK_AVAILABLE_IN_ALL int gtk_entry_buffer_get_max_length(GtkEntryBuffer *buffer)
gsize GType
Definition gtype.h:427
unsigned int guint
Definition gtypes.h:61
void(* _gtk_reserved7)(void)
void(* _gtk_reserved4)(void)
guint(* delete_text)(GtkEntryBuffer *buffer, guint position, guint n_chars)
void(* _gtk_reserved3)(void)
void(* _gtk_reserved1)(void)
GObjectClass parent_class
void(* _gtk_reserved8)(void)
void(* _gtk_reserved2)(void)
guint(* get_length)(GtkEntryBuffer *buffer)
void(* deleted_text)(GtkEntryBuffer *buffer, guint position, guint n_chars)
void(* _gtk_reserved5)(void)
guint(* insert_text)(GtkEntryBuffer *buffer, guint position, const char *chars, guint n_chars)
void(* _gtk_reserved6)(void)
void(* inserted_text)(GtkEntryBuffer *buffer, guint position, const char *chars, guint n_chars)
GObject parent_instance