[Top] | [Contents] | [Index] | [ ? ] |
1. Copying Your rights. 2. What is GTK? 3. Types 4. Objects 5. Signals Overview Signals overview. 6. Widget Overview Widget overview. 7. Utility objects 8. Initialization, exit and other features 9. Using GTK 10. Object internals 11. Signal internals 12. Widget internals Function Index Index of functions. Concept Index Index of concepts.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GTK is free; this means that everyone is free to use it and free to redistribute it on a free basis. GTK is not in the public domain; it is copyrighted and there are restrictions on its distribution, but these restrictions are designed to permit everything that a good cooperating citizen would want to do. What is not allowed is to try to prevent others from further sharing any version of GTK that they might get from you.
Specifically, we want to make sure that you have the right to give away copies of GTK, that you receive source code or else can get it if you want it, that you can change GTK or use pieces of it in new free programs, and that you know you can do these things.
To make sure that everyone has such rights, we have to forbid you to deprive anyone else of these rights. For example, if you distribute copies of GTK, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights.
Also, for our own protection, we must make certain that everyone finds out that there is no warranty for GTK. If GTK is modified by someone else and passed on, we want their recipients to know that what they have is not what we distributed, so that any problems introduced by others will no reflect on our reputation.
The precise conditions of the licenses for GTK are found in the General Public Licenses that accompany it.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GTK is a library for creating graphical user interfaces similar to the Motif "look and feel". It is designed to be small and efficient, but still flexible enough to allow the programmer freedom in the interfaces created. GTK allows the programmer to use a variety of standard user interface widgets (see section 6. Widget Overview) such as push, radio and check buttons, menus, lists and frames. It also provides several "container" widgets which can be used to control the layout of the user interface elements.
GTK provides some unique features. (At least, I know of no other widget library which provides them). For example, a button does not contain a label, it contains a child widget, which in most instances will be a label. However, the child widget can also be a pixmap, image or any combination possible the programmer desires. This flexibility is adhered to throughout the library.
To make life easier for you, GTK presents this flexibility in a uniform framework. Specifically, it implements its own support for object oriented programming that is well adapted to the purposes of a user interface toolkit and it aims at providing a reasonable sane and disciplined programming interface. This uniformity and discipline is intended to make it easy and reliable to access GTK from languages other than C. Especially more dynamic languages like Perl, Python or Scheme will find amble support, and in fact, bindings to these languages already exist.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Other kid's games are all such a bore! They've gotta have rules and they gotta keep score!
-- Calvin about CalvinBall(tm)
GTK implements a semi-simple type system with an associated class mechanism for widgets and several other useful objects. This type system is intended to be general enough to allow both a smooth binding of dynamically typed languages to Gtk, as well as to serve for a rigorous and formalistic definition of the larger part of the Gtk API.
The classes for the individual widgets are by far the most important part of this type system, but before we get to them, we describe the basics of the type system itself. This is mostly of interest for widget writers and language binders, so you might want to skip ahead to the next chapter, which talks about the object oriented stuff.
3.1 Introduction to the Type System 3.2 Basic Concepts 3.3 Simple Types 3.4 Enumerations and Flags 3.5 Strings 3.6 Boxed Types 3.7 Callbacks 3.8 Composite Types
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Gtk defines its own system of types, much like a computer language
defines what types it supports. Of course, the Gtk type system is build
on top of the types that C provides, so it includes members like
`int', `long' and `float'. But, compared to C, it allows
only few carefully selected types and specifies a lot of restrictions on
the way you can use values of these types. For example, there is no
general facility for specifying pointer to X. Instead, we take a
more higher level approach and define such things as `string',
which is just like a char*
but with additional rules about how to
manage the memory that it points to.
The type system has two purposes: to define a formal system with which to describe the various exported features of Gtk; and to implement this system at run-time so that we get sound and flexible dynamic types for the dynamic languages that want to interface with Gtk.
Let me restate this with different words, because I think it is important to understand this idea. We will see in a moment that the type system is indeed well defined and all this detail is implemented with functions and data structures in Gtk. For example, every type (and there can be any number of them) can be represented with a unique integer and Gtk has support for the necessary bookkeeping for this. Every type also has a name and there are functions for converting between the name of a type and its unique number. Maybe more useful, there is a big discriminated union that can be used to pass around a value of any representable type, together with its precise type.
This is the run-time or dynamic side of the type system. Mostly, you do
not need to use it when you don't want to. The compile-time or static
side of the type system can is used to statically define the programming
interface of Gtk. For example, suppose there is function gtk_foo
in the Gtk API that has a prototype
char *gtk_foo (char *); |
This looks like it does something with strings. But what does it do with the memory of the string that has been passed in, and what are we supposed or allowed to do with the memory that the returned pointer points to? The more restricted type `string' from the Gtk type system can be used to be more precise. In fact, the definition of `string' below includes the rule that when a `string' is passed to a function, that function is not allowed to retain a pointer into the string beyond the life time of that function call. So we are safe to deallocate it or override it when the function has returned. Likewise, the definition specifies that the memory of a `string' that is returned from a function becomes the sole property of the calling function. The calling function is responsible for deallocating it eventually and it can be sure that nobody else scribbles in it. When `gtk_foo' really obeys these rules, we can say that it takes one argument, which is a `string', and it returns a `string'.
Now we can understand why it makes sense to have a more restrictive type system than that of C. With it, it is possible to be more precise and we actually have a framework where we can be sure that as long as we stay inside this framework we are not gratuitously causing trouble for languages that are more disciplined than C. Of course, you are not restricted to making all your interfaces expressible within the framework. There are valid reasons for breaking it, for performance or simply for convenience. But please try to provide all the functionality of your module in such a way that it can be described with this type system and treat the non-conforming functions as additional goodies that are nice to have but not essential. The reward is an instant accessibility of your code from a huge number of scripting and extension languages such as Perl, Python, and Guile.
These formal specifications of the Gtk interface are contained in special declarations in the header files of Gtk. They are ignored by the C compiler, but can be used by other language processors. For extra convenience, these declarations are also available in a more condensed form that is easier to parse. Tools for generating bindings of Gtk to other languages can read these declarations and--because all the important details are defined--automatically generate the bulk of the needed glue code. It is also possible to feed these declarations into a running application (an interface builder, say) and thus make it aware of new widgets and functions without recompiling anything.
The run-time side of the type system is also somewhat introspective. This means that you can query Gtk about all the members of an enumeration for example. Gtk provides tools that help you provide this introspection for your definitions also.
Types are not enough to completely specify an interface, so GTK also has modes. A mode specifies what happens to a value when it crosses a module boundary; it can be `in', `out', or `inout'. Most fundamental types (and their derived types) support only mode `in'. The modes `out' and `inout' can only be used with the composite types: lists and vectors. When argument of these types are marked as `out' or `inout' it means that the called module is allowed to change the contents of the composite value and that these changes need to be propagated back to the originator of the value. Mode `out' means that the argument has no meaningful value at the beginning and should not be read. Mode `in' specifies that the called module is not allowed to change the value in any way.
The type system allows for an unbounded number of types. Every widget is a type for example and you can add new widget types at any time without confusing the run-time implementation of the type system. Nevertheless, all types are derived from a certain fundamental type, and there are only a small and finite number of fundamental types. We only specify rules for the fundamental types and all other types inherit these rules from their fundamental type. For example, `int' is a fundamental type, as is `GtkObject'. All widgets derive from `GtkObject' and so the rules for `GtkObject' apply to all widgets as well.
This derivation defines a type hierarchy, but this hierarchy is not completely general. You can't derive from `int' for example, and you can only have one level of derivation from `enum'. The fundamental type `GtkObject', however, is the basis for the large and deep hierarchy of widget types.
The individual fundamental types are defined and explained in the following sections. Here is a complete list of them:
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The basis for the type system are the fundamental types. At run-time,
they are represented by members of the GtkFundamentalType
enumeration. For the static declarations, they are identified with a
unique name.
GTK_TYPE_INVALID
GTK_TYPE_INVALID
to
express exceptional situations. This member does not really correspond
to a fundamental type and thus there is no name for it.
GtkType
holds the run-time representation of a type. It
is an integer of a certain size. The follwing macros are defined to
access the basic properties of a GtkType
:
Both macros simply access different bit-fields of a GtkType
, so
they are very efficient.
New types are registered with the gtk_type_unique
function. Any
kind oftype can be registered with gtk_type_unique
but there are
convenience functions for most fundamental types. Each fundamental type
has its own interpretation of the rules below and these convenience
functions should be used to automatically get the type registration
right. So, don't be put off by the apparent complexity of the interface
to gtk_type_unique
. You will be using it only for new widgets,
and there the rules are simple.
The GtkTypeInfo
structure is used to communicate information to
gtk_type_unique
as opposed to passing in large numbers of
parameters.
typedef struct _GtkTypeInfo GtkTypeInfo; struct _GtkTypeInfo { gchar *type_name; guint object_size; guint class_size; GtkClassInitFunc class_init_func; GtkObjectInitFunc object_init_func; gpointer reserved_1; gpointer reserved_2; GtkClassInitFunc base_class_init_func; } |
type_name
field refers to the name of the type. This is the
same name that is used in the static definitions. It is convention for
the type name to be closely related to the name of the underlying C
type. For example, the type name of the GtkObject
structure is
"GtkObject", and the name of the GtkWindowType
enumeration is
"GtkWindowType". Note that the C type corresponding to "GtkObject"
is really a pointer to a GtkObject
struct, but the name has no
"*" in it.
object_size
field refers to the size in bytes of the C
structure for types that have such a structure. The easiest (and
portable) means of computing this size is by using the C sizeof
operator. For instance, the sizeof of the GtkObject
structure is
computed by doing sizeof (GtkObject)
. When the type has no
associated structure or when you do not want to support the
gtk_type_new
function for the new type, set object_size
to
0. Only types derived from GTK_TYPE_OBJECT can be handled by
gtk_type_new
, anyway.
class_size
field refers to the size in bytes of the C
structure for the class. Again, the sizeof
operator should be
used to compute this value. If you don't want to have a class structure
for this type, set the field to 0. gtk_type_class
will then
always return NULL
.
class_init_func
and base_class_init_func
fields are
callbacks which are used by the type mechanism to initialize class
specific fields. The single argument these functions take is a pointer to
a class structure. When you do not need one or both of them, set the
corresponding field to NULL
. The class_init_func
will be
called at most once, right after the class structure of size
class_size
has been allocated. The interaction between
class_init_func
and base_class_init_func
is only really
useful for the full-fledged object system. It is described there
see section 4. Objects.
object_init_func
field is a callback which is used by the
type mechanism to initialize object specific fields for structures that
have been allocated via gtk_type_new
. The single argument this
functions takes is a pointer to an object structure. If you do not want
any special object initialization to take place, set this to
NULL
. All object initialization functions for all types that are
part of the inheritance chain are called, starting with the most basic
type.
You can only register a specific name once.
gtk_type_unique
.
The returned structure is shared by all objects of type and, as such, should not be modified.
Values of all types can be handled uniformly by storing them into a
GtkArg
structure. The GtkArg
has the following fields:
gchar *name
GtkArg
structure a name. It is not used much.
GtkType type
union d
GTK_VALUE_*
macros. There is one macro for each
fundamental type, and its name is derived from the name of the
GtkFundamentalType enumeration members simply by replacing "Gtk_TYPE"
with "GTK_VALUE". All GTK_VALUE_*
macros take a GtkArg
structure as their only parameter (not a pointer) and evaluate to
a lvalue.
For example, the accessor for the fundamental type GTK_TYPE_INT is called GTK_VALUE_INT and you could use it like this:
GtkArg value; value.name = NULL; value.type = GTK_TYPE_INT; GTK_VALUE_INT(value) = 7; |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Gtk type system has a full set of the usual simple types: integers, floating point numbers, but also boolean and character. You can not derive new types from these.
Enum | Name | Description |
GTK_TYPE_NONE | "void" | A type without value. |
GTK_TYPE_CHAR | "char" | A 8-bit unsigned number representing a character. Numbers between 0 and 127 are ASCII, the rest is undefined. |
GTK_TYPE_BOOL | "gboolean" | The boolean type. It is some small integer where the number 0 represents false and 1 is true. No other values are allowed. |
GTK_TYPE_INT | "gint" | A signed integer with at least 32 bits. |
GTK_TYPE_UINT | "guint" | A unsigned integer with at least 32 bits. |
GTK_TYPE_LONG | "glong" | A signed integer with at least 32 bits. |
GTK_TYPE_ULONG | "gulong" | A unsigned integer with at least 32 bits. This is large enough to hold a coerced pointer. |
GTK_TYPE_FLOAT | "gfloat" | A single precision floating point number. |
GTK_TYPE_DOUBLE | "gfloat" | A souble precision floating point number. |
GTK_TYPE_POINTER | "gpointer" | A untyped pointer. Do not use this if you can avoid it. |
The values of these types are all represented `directly' with the C types that are indicated in the `name' column above. see section 3.6 Boxed Types for a discussion of this.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The GtkObject type is the root of the type hierarchy used by GTK. It provides a minimal set of fields used to implement the actual object, class and signal mechanisms, as well as several utility routines which make dealing with objects easier.
For the adventurous, see 10. Object internals.
GtkObject
type identifier.
signals
field in the GtkObjectClass
structure class. See section 5. Signals Overview.
destroy
signal. The check which is performed is to
make sure object is not already processing another signal. If this
were the case then destroying the object immediately would undoubtedly
cause problems as the other signal would not be able to tell the object
was destroyed. The solution is that if object is processing another
signal we mark object is needing to be destroyed. When we finish
processing of the other signal we check whether the object needs to be
destroyed.
The GtkObject type provides a mechanism for associating arbitrary
amounts of data with an object. The data is associated with the object
using a character string key. The functions gtk_object_set_data
,
gtk_object_get_data
, and gtk_object_remove_data
are the
interface to this mechanism. Two other routines,
gtk_object_set_user_data
and gtk_object_get_user_data
,
exist as convenience functions which simply use the same mechanism.
user_data
field of object.
user_data
field of object.
The GtkObject type also provides a mechanism for specifying initialization values for fields. This general mechanism is called object value stacks. The reason for using value stacks is that they can simplify the life of the programmer. For instance, by default widgets are non-visible when created. However, the "visible" value for widgets may be specified so that widgets are made visible when created. (FIXME: unfinished).
GTK_PARAM_POINTER
, then
data will be a pointer to a pointer. If the value stack is empty
or does not exist or an error occurs, gtk_object_peek_value
will
return FALSE
. On success it will return TRUE
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Signals are GTK's method for objects to perform callbacks. A signal is an event which occurs upon an object. The programmer can connect to a signal of an object which involves specifying a function to be called when that signal is emitted in the specified object.
When a signal is emitted, both the class function associated with the signal (when it was defined) and all signal handlers installed for that signal on the particular object emitting the signal are called. The widget programmer can specify whether the class function is to be called before after or both before and after the signal handlers installed by the widget user. The widget user can, however, specify that their signal handler is to be run after the class function (using the "_after" signal connection routines). Any signal handling function can emit the same signal on the same object while it is running causing that signal emission to either restart or to run recursively. Additionally, signal emission can be terminated prematurely. While both such abilities are rarely used, they do allow for greater flexibility in regards to signals. For instance, a programmer can attach to the key press event signal and intercept all tab key presses from a widget. This particular example is used in the file selection dialog to implement tab completion of filenames and prevent the entry widget from inserting the tab into its buffer.
Signals are selected using either an integer identifier or a character string name. It is convention to name the signal the same as the class function which is associated with it. There are two versions of most of the signal functions, one which takes an integer identifier and one which takes a character string name for the signal.
run_type specifies whether the class function should be run before
(GTK_RUN_FIRST
), after (GTK_RUN_LAST
) or both before and
after normal signal handlers (GTK_RUN_BOTH
). Additionally, the
GTK_RUN_NO_RECURSE
value can be or'ed with any of those values to
specify that the signal should not be recursive. By default, emitting
the same signal on the same widget will cause the signal to be emitted
twice. However, if the GTK_RUN_NO_RECURSE
flag is specified,
emitting the same signal on the same widget will cause the current
signal emission to be restarted. This allows the widget programmer to
specify the semantics of signal emission on a per signal
basis. (The GTK_RUN_NO_RECURSE
flag is used by the GtkAdjustment
widget).
The function_offset is the byte offset from the start of the class
structure to the class function field within the class structure. The
easiest means to compute this offset is by using the
GTK_SIGNAL_OFFSET
macro which takes the class structure type as
the first argument and the field as the second argument. For example,
GTK_SIGNAL_OFFSET (GtkObjectClass, destroy)
will give the offset
of the destroy
class function within the
GtkObjectClass
. Note: An offset is specified instead of an
absolute location since there will be multiple instances of a class
structure being referenced. (The GtkWidgetClass
structure "is
a" GtkObjectClass
structure, etc.)
The marshaller function is used to invoke a signal handler. Since signal handlers may take different parameters and return values and a general mechanism for invoking them is not apparent, the approach of making the signal creator responsible for invoking the signal handler was taken. (FIXME: unfinished).
The return_val and nparams and the remaining arguments
specify the return value and the arguments to the signal handler
respectively. Note: There is an implicit first argument to every signal
handler which is the widget the signal has been emitted from. The
variable argument list (...) specifies the types of the
arguments. These can be one of GTK_PARAM_CHAR
,
GTK_PARAM_SHORT
, GTK_PARAM_INT
, GTK_PARAM_LONG
,
GTK_PARAM_POINTER
or GTK_PARAM_FUNCTION
. It is undefined
to specify GTK_PARAM_NONE
as an argument type, however it is OK
to use GTK_PARAM_NONE
for return_val. (This corresponds to
returning a void
).
gtk_signal_new
returns the integer identifier of the newly
created signal. Signal identifiers start numbering at 1 and increase
upwards. A value of -1 will be returned if an error occurs.
Note: gtk_signal_new
is only needed by widget writers. A
normal user of GTK will never needed to invoke this function.
gtk_signal_emit
will
return FALSE
and will return TRUE
on success. The signal
definition determines the parameters passed in the variable argument
list (...
). For example, if the signal is defined as:
gint (* event) (GtkWidget *widget, GdkEvent *event); |
Then a call to emit the "event" signal would look like:
GdkEvent event; gint return_val; ... gtk_signal_emit (some_object, gtk_signal_lookup ("event", GTK_OBJECT_TYPE (some_object)), &event, &return_val); |
Notice that the widget
argument is implicit in that the first
argument to every signal is a type derived from GtkObject
. The
return_val argument is actually a pointer to the return value type
since the signal mechanism needs to be able to place the return value in
an actual location. And lastly, the gtk_signal_lookup
call is
normally avoided by using the gtk_signal_emit_by_name
function
instead. gtk_signal_emit
is normally used internally by widgets
which know the signal identifier (since they defined the signal) and can
therefore side-step the cost of calling gtk_signal_lookup
.
gtk_signal_emit
except that the signal is referenced
by name instead of by its integer identifier.
gtk_signal_lookup
. Alternatively, the function
gtk_signal_emit_stop_by_name
can be used to refer to the signal
by name. Attempting to stop the emission of a signal that isn't being
emitted does nothing.
gtk_signal_emit_stop
except that the signal is
referenced by name instead of by its integer identifier.
gtk_signal_connect
returns an integer identifier for the
connection which can be used to refer to it in the future. Specifically
it is useful for removing the connection and/or blocking it from being
used.
gtk_signal_connect
except the signal handler is
connected in the "after" slot. This allows a signal handler to be
guaranteed to run after other signal handlers connected to the same
signal on the same object and after the class function associated with
the signal.
Like gtk_signal_connect
, gtk_signal_connect_after
returns
an integer identifier which can be used to refer to the connection.
gtk_signal_connect
with the difference
that slot_object is passed as the first parameter to func
instead of the signal emitting object. This can be useful for connecting
a signal emitted by one object to a signal in another object. A common
usage is to connect the "destroy" signal of dialog to the "clicked"
signal emitted by a "close" button in the dialog. That is, the
"clicked" signal emitted by the button will caused the "destroy"
signal to be emitted for the dialog. This is also the "right" way to
handle closing of a dialog since the "destroy" signal will be sent if
the dialog is deleted using a window manager function and this enables
the two methods of closing the window to be handled by the same
mechanism. Returns an integer identifier which can be used to refer to
the connection.
gtk_signal_connect_object
except the signal handler is
connected in the "after" slot. This allows a signal handler to be
guaranteed to run after other signal handlers connected to the same
signal on the same object and after the class function associated with
the signal. Returns an integer identifier which can be used to refer to
the connection.
gtk_signal_connect*
family of functions.
gtk_signal_connect*
family of functions. For the
gtk_signal_connect_object*
functions, data refers to the
slot_object.
Note: This will remove all signal handlers connected to object which were connected using data as their func_data argument. Multiple signal handlers may be disconnected with this call.
gtk_signal_connect*
family of functions. If the signal is already
blocked no change is made.
gtk_signal_connect*
family of
functions. For the gtk_signal_connect_object*
functions,
data refers to the slot_object. If the signal is already
blocked no change is made.
Note: This will block all signal handlers connected to object which were connected using data as their func_data argument. Multiple signal handlers may be blocked with this call.
gtk_signal_connect*
family of functions. If the signal is already
unblocked no change is made.
gtk_signal_connect*
family of
functions. For the gtk_signal_connect_object*
functions,
data refers to the slot_object. If the signal is already
unblocked no change is made.
Note: This will unblock all signal handlers connected to object which were connected using data as their func_data argument. Multiple signal handlers may be unblocked with this call.
gtk_signal_new
requires a callback in order to actually call a
signal handler for a particular signal. The vast majority of signals are
of the particular form:
(* std_signal) (gpointer std_arg); |
gtk_signal_default_marshaller
is a signal marshaller which
marshals arguments for a signal of that form.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Widgets are the general term used to describe user interface objects. A widget defines a class interface that all user interface objects conform to. This interface allows a uniform method for dealing with operations common to all objects such as hiding and showing, size requisition and allocation and events.
The common interface that widgets must adhere to is described by the GtkWidget and GtkWidgetClass structure. For the purposes of using GTK these structures can be considered read-only and, for the most part, opaque.
All widget creation routines in GTK return pointers to GtkWidget structures. In reality, all widget creation routines create structures that can be viewed as equivalent to the GtkWidget structure, but often have contain additional information. See section 10. Object internals.
The widgets available for use are implemented in a hierarchy. Several widgets exist solely as common bases for more specific widgets. For example, it is not possible to create a ruler widget itself, but the ruler widget provides a base and functionality common to the horizontal and vertical rulers.
The available widgets (in alphabetical order):
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The alignment widget is a container (see section 6.13 The container widget) derived from the bin widget (see section 6.4 The bin widget). Its entire purpose is to give the programmer flexibility in how the child it manages is positioned when a window is resized.
Normally, a widget is allocated at least as much size as it requests. (see section 6.13 The container widget for a discussion of geometry management). When a widget is allocated more size than it requests there is a question of how the widget should expand. By convention, most GTK widgets expand to fill their allocated space. Sometimes this behavior is not desired. The alignment widget allows the programmer to specify how a widget should expand and position itself to fill the area it is allocated.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkAlignment
type identifier.
GtkAlignment
object and initialize it with the
values xalign, yalign, xscale and yscale. The
new widget is returned as a pointer to a GtkWidget
object. NULL
is returned on failure.
GtkAlignment
structure directly (or, for that matter, any type
derived from GtkObject
).
GtkAlignment*
. See section 8.7 Macros defined by all objects, for
more info.
GtkAlignmentClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkAlignment
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The arrow widget is derived from the misc widget (see section 6.42 The misc widget) and is intended for use where a directional arrow (in one of the four cardinal directions) is desired. As such, it has very limited functionality and basically only draws itself in a particular direction and with a particular shadow type. The arrow widget will expand to fill all the space it is allocated.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GTK_ARROW_UP
, GTK_ARROW_DOWN
,
GTK_ARROW_LEFT
or GTK_ARROW_RIGHT
. This will set the arrow
pointing in the direction specified.
GTK_SHADOW_IN
and
GTK_SHADOW_OUT
shadow types are supported for drawing
arrows. Other shadow types will cause nothing to be drawn.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkArrow
type identifier.
GtkArrow
object and initialize it with the values
arrow_type and shadow_type. The new widget is returned as a
pointer to a GtkWidget
object. NULL
is returned on
failure.
GtkArrow
structure directly (or, for that matter, any type derived from
GtkObject
).
GtkArrow*
. See section 8.7 Macros defined by all objects, for
more info.
GtkArrowClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkArrow
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Ensure that the child window has a specified aspect ratio or, if obey_child, has the same aspect ratio as its requested size. Derived from see section 6.23 The frame widget).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkAspectFrame
type identifier.
GtkAspectFrame
object and initialize it with the values
label, xalign, yalign, ratio and obey_child.
The new widget is returned as a pointer to a GtkWidget
object.
NULL
is returned on failure.
GtkAspectFrame*
. See section 8.7 Macros defined by all objects, for
more info.
GtkAspectFrameClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkAspectFrame
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The bin widget is a container (see section 6.13 The container widget) derived from the container widget. It is an abstract base class. That is, it is not possible to create an actual bin widget. It exists only to provide a base of functionality for other widgets. Specifically, the bin widget provides a base for several other widgets that contain only a single child. These widgets include alignments (see section 6.1 The alignment widget), frames (see section 6.23 The frame widget), items (see section 6.34 The item widget), viewports (see section 6.67 The viewport widget) and windows (see section 6.74 The window widget)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkBin
type identifier.
GtkBin*
. See section 8.7 Macros defined by all objects, for
more info.
GtkBinClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkBin
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The box widget is a container (see section 6.13 The container widget) derived from the container widget. It is an abstract base class used by the horizontal box (see section 6.25 The horizontal box widget), the vertical box (see section 6.65 The vertical box widget) and the (see section 6.6 The button box widget) widgets to provide a base of common functionality.
A box provides an abstraction for organizing the position and size of widgets. Widgets in a box are laid out horizontally or vertically. By using a box widget appropriately, a programmer can control how widgets are positioned and how they will be allocated space when a window gets resized.
The key attribute of boxes is that they position their children in a single row (horizontal boxes) or column (vertical boxes). In the case of horizontal boxes, all children are stretched vertically. The vertical size of the box is determined by the largest vertical requisition of all of its children. Similarly, a vertical box stretches all of its children horizontally. The horizontal size (of the vertical box) is determined by the largest horizontal requisition of all of its children. An alignment widget (see section 6.1 The alignment widget) can be used to control child allocation more precisely on a per child basis.
The second attribute of boxes is how they expand children. In the case of a horizontal box, the main control is over how children are expanded horizontally to fill the allocated area. (The rest of this discussion will focus on horizontal boxes but it applies to vertical boxes as well).
There are two flags which can be set controlling how a widget is
expanded horizontally in a horizontal box. These are the expand
and fill
. There operation is fairly simple. If expand
is
set, the child's potentially allocated area will expand to fill available
space. If fill
is set, the child's actual allocated area will be
its potentially allocated area. There is a difference between
the potentially area (which is the area the box widget sets aside for
the child) and the actual allocated area (which is the area the box
widget actual allocates for the widget via
gtk_widget_size_allocate
).
The allocation of space to children occurs as follows (for horizontal boxes):
expand
flag set is allocated extra_width
/ nexpand_children
extra pixels horizontally. If the homogeneous
flag was set, all children are considered to have the expand
flag
set. That is, all children will be allocated the same area.The
horizontal box is a fair widget and, as such, divides up any extra
allocated space evenly among the "expand" children. (Those children
which have the expand
flag set). The exception occurs when
extra_width / nexpand_children
does not divide cleanly. The extra
space is given to the last widget.
spacing
number of pixels separate each child. Note: The
separation is between the potentially allocated area for each child and
not the actual allocated area. The padding
value associated with
each child causes that many pixels to be left empty to each side of the
child.
fill
flag set it is allocated its potentially
allocated area. If it does not, it is allocated its requested size
horizontally and centered within its potentially allocated area. Its
vertical allocation is still the maximum requested size of any child.
See section 6.25 The horizontal box widget, and 6.65 The vertical box widget, for code examples of using horizontal and vertical boxes.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkBox
type identifier.
gtk_box_pack_start (box, widget, TRUE, TRUE, 0); |
gtk_box_pack_start (box, widget, TRUE, TRUE, 0); |
GtkBox*
. See section 8.7 Macros defined by all objects, for
more info.
GtkBoxClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkBox
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The button box, like the box widget, (see section 6.5 The box widget) provides an abstraction for organizing position and size of widgets. In the case of the button box it is targeted at the button widget,(see section 6.7 The button widget). Button widgets are laid out in the box horizontally or vertically. By using a button box widget appropriately, a programmer can control how the button widgets are positioned and how they will be allocated space when a window gets resized.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GTK_BUTTONBOX_SPREAD
GTK_BUTTONBOX_SPREAD
will spread the buttons out
evenly within the button box. When the parent window is resized they will
re-adjust to the new window dimensions. The gtk_button_box_set_spacing
function will set the minimum space that the buttons will leave between
themselves.
GTK_BUTTONBOX_EDGE
GTK_BUTTONBOX_START
GTK_BUTTONBOX_START
will place the buttons at the
start of the button box, taking into account the spacing as set by the
gtk_button_box_set_spacing
function. The buttons will not move
when the parent window is re-sized.
GTK_BUTTONBOX_END
GTK_BUTTONBOX_END
will place the buttons at the
end of the button box, taking into account the spacing as set by the
gtk_button_box_set_spacing
function. Again like the
GTK_BUTTONBOX_START
layout style the buttons will not move when
the parent window is re-sized.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkButtonBox
type identifier.
GTK_BUTTONBOX_SPREAD
, GTK_BUTTONBOX_EDGE
,
GTK_BUTTONBOX_START
or GTK_BUTTONBOX_END
.
The following example:
gtk_button_box_set_layout (GTK_BUTTON_BOX (box), GTK_BUTTONBOX_SPREAD); |
GtkButtonBox
object passed to this
function in the widget variable.
layout = gtk_button_box_get_layout(GTK_BUTTON_BOX (box)); |
GtkButtonBox*
. See section 8.7 Macros defined by all objects, for
more info.
GtkButtonBoxClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkButtonBox
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A pressable button. Contains a widget. Changes its appearance (hilites) when it gets the focus. Changes its appearance (pressed) when activated. Derived from see section 6.13 The container widget.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkButton
type identifier.
GtkButton
object. The new widget is returned as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkButton
object and set the text that is
on the button to label. The new widget is returned as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkButton*
. See section 8.7 Macros defined by all objects, for
more info.
GtkButtonClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkButton
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Another form of toggle button (see section 6.60 The toggle button widget) with an indicator. Contains a widget to the right of the indicator. Changes its appearance (hilites) when it gets the focus.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkCheckButton
type identifier.
GtkCheckButton
object and initialize it with the
default values in the library. The new widget is returned as a pointer
to a GtkWidget
object. A NULL
is returned on failure.
GtkCheckButton
object and initialize it with the
values label. The new widget is returned as a pointer to a
GtkWidget
object. NULL
is returned on any failure.
GtkCheckButton*
. See section 8.7 Macros defined by all objects, for
more info.
GtkCheckButtonClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkCheckButton
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Derived from see section 6.40 The menu item widget. Very similar to a checkbutton (see section 6.8 The check button widget), except that it's a menu item. Has a toggled state which is displayed in a small rectangle to the left of the contained widget.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkCheckMenuItem
type identifier.
GtkCheckMenuItem
object. The new widget is returned as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkCheckMenuItem
object and initialize it with the values
label. The new widget is returned as a pointer to a GtkWidget
object. NULL
is returned on failure.
GtkCheckMenuItem*
. See section 8.7 Macros defined by all objects, for
more info.
GtkCheckMenuItemClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkCheckMenuItem
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A list of rows of columns, with a title row. You can insert rows, and delete rows. The user can scroll around and select a row. Derived from see section 6.13 The container widget. Cells can be empty, have a text and/or pixmap, or be a widget.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkCList
type identifier.
GtkCList
initializing it with the value columns.
The new widget is returned as a pointer to a GtkWidget
object.
NULL
is returned on failure.
GtkCList
.
GtkCList
clist
to width. This function is a necessary step in creating a
GtkCList
because otherwise the column width is chosen from the width
of the column title, which is almost never correct.
GtkClist
in clist to column
and row. The row_align and col_align are between zero and
one, representing the location the row should appear on screen. Setting
row_align or the col_align to 0.0 will be the top or left of the
viewing area. Setting the row_align or col_align to 1.0 will
be the bottom or right of the viewing area. If the row or column
is -1 then there is no change.
GtkCList
clist. The color must
already be allocated.
GtkCList
pointed to by clist. The color must be previously
allocated.
GtkCList
pointed to by the clist. The return value is the index of the row that
was just added.
GtkCList
pointed to by clist at row
row with the text in text[].
GtkCList
pointed to by clist.
GtkCList
pointed
to by clist. NULL
is returned if no data was set.
GtkCList
pointed to by clist.
GtkCList
pointed to by clist.
GtkCList
pointed to by clist.
This is much faster then removing each item separately with
gtk_clist_remove
.
GtkCList*
. See section 8.7 Macros defined by all objects, for
more info.
GtkCListClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkCList
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A widget that allows a user to pick a color in one of many ways. They can click on a color wheel or saturation bar. They can change hue, saturation, value, red, green, or blue with a slider, or by entering values. Also allows the user to set an alpha (opacity) value. Derived from see section 6.65 The vertical box widget.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkColorSelection
type identifier.
GtkColorSelection
object. The new object is returned as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkColorSelection
type identifier.
GtkColorSelection
object initializing the title bar of
the resulting dialog to title. The new widget is returned as a pointer
to a GtkWidget
object. NULL
is returned on failure.
GtkColorSelection*
. See section 8.7 Macros defined by all objects, for
more info.
GtkColorSelectionClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkColorSelection
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Text input box which also lets you choose from pre-defined values from a drop-down menu. Derived from see section 6.25 The horizontal box widget.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkCombo
type identifier.
GtkCombo
object returning the new widget as a pointer to
a GtkWidget
object. NULL
is returned on failure.
GtkCombo*
. See section 8.7 Macros defined by all objects, for
more info.
GtkComboClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkCombo
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A base class for objects that are built out of other widgets. Many widgets are containers. For example, a button contains a widget. That widget might be a text label (usually is), or a pixmap, or even an hbox which has a label and a pixmap.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkContainer
type identifier.
GtkContainer*
. See section 8.7 Macros defined by all objects, for
more info.
GtkContainerClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkContainer
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The GtkCTree widget is a multi-columned list with a designated column, the
tree column
, to display hierarchically-organized data. Each node is
either a folder (a branch of the tree) or a leaf. Nodes can be
(recursively) expanded, collapsed, (un)selected, removed, moved, sorted etc.
GtkCTree is a descendant of see section 6.10 The compound list widget. Therefore, a cell in a column other than the tree column can only contain a string, a pixmap, both or nothing. A node in the tree column can contain a string and up to two pixmaps and masks, indicating the "folder openend" and "folder closed" status.
Compared to GtkCList, there is no concept of row numbers. Therefore, a number
of GtkCList methods had to be re-implemented taking GList *node
arguments instead of gint row
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkCTree
type identifier.
On success, a pointer to the newly created widget is returned, and NULL
otherwise.
On success, a pointer to the newly created widget is returned, and NULL
otherwise.
On success, the pointer to the newly inserted node is returned, and NULL otherwise.
GtkCTree*
. See section 8.7 Macros defined by all objects, for
more info.
GtkCTreeClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkCTree
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Derived from see section 6.18 The drawing area widget.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkCurve
type identifier.
GtkCurve
returning the new widget as a pointer to a
GtkWidget
object.
GtkCurve*
. See section 8.7 Macros defined by all objects, for
more info.
GtkCurveClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkCurve
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Lets the user edit a gamma curve (a one-to-one mapping usually used to adjust the intensity of an image to the physical characteristics of the output device). You can set the minimum and maximum values for input and output. You can set the initial vector as well. You are guaranteed that every input value will have a (not necessarily unique) output value specified. Derived from see section 6.65 The vertical box widget. Makes use of see section 6.15 The curve widget to draw the curve.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkGamma
type identifier.
GtkGamma
returning the new widget as a pointer to a
GtkWidget
object.
GtkGammaCurve*
. See section 8.7 Macros defined by all objects, for
more info.
GtkGammaCurveClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkGammaCurve
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkDialog
type identifier.
GtkDialog
object and return the new widget as a pointer
to a GtkWidget
object. NULL
is returned on failure.
GtkDialog*
. See section 8.7 Macros defined by all objects, for
more info.
GtkDialogClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkDialog
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A base class for widgets that need a box to draw into. So far, only used by GtkCurve.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkDrawingArea
type identifier.
GtkDrawingArea
object returning the new widget as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkDrawingArea*
. See section 8.7 Macros defined by all objects, for
more info.
GtkDrawingAreaClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkDrawingArea
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Enter text into this widget. Derived from GtkEditable. Can be set so it isn't editable.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
entry
widget to the string pointed to by text.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkEntry
type identifier.
GtkEntry
object. The new widget is returned
as a pointer to a GtkWidget
object. NULL
is returned on
failure.
GtkEntry
object initializing it with the value max.
The new widget is returned as a pointer to a GtkWidget
object.
NULL
is returned on failure.
GtkEntry
object to
text. It is important to not set the fields of the GtkEntry
structure directly (or, for that matter, any type derived from
GtkObject
).
GtkEntry
structure directly.
GtkEntry
widget. It is important to not set the fields of the GtkEntry
structure
directly.
GtkEntry
object invisible
when visible is TRUE
. Defaults to FALSE
.
GtkEntry
as a pointer to a
gchar
variable.
GtkEntry*
. See section 8.7 Macros defined by all objects, for
more info.
GtkEntryClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkEntry
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Derived from see section 6.4 The bin widget. Used by see section 6.64 The tree item widget.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkEventBox
type identifier.
GtkEventBox
returning the new widget as a pointer to
a GtkWidget
object. NULL
is returned on failure.
GtkGtkEventBox*
. See section 8.7 Macros defined by all objects, for
more info.
GtkGtkEventBoxClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkGtkEventBox
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkFileSelection
type identifier.
GtkFileSelection
object and return the new widget as a
pointer to a GtkWidget
. NULL
is returned on failure.
GtkFileSelection*
. See section 8.7 Macros defined by all objects, for
more info.
GtkFileSelectionClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkFileSelection
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkFixed
type identifier.
GtkFixed
object returning the new widget as a pointer to
a GtkWidget
object. NULL
is returned on failure.
GtkFixed*
. See section 8.7 Macros defined by all objects, for
more info.
GtkFixedClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkFixed
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkFrame
type identifier.
GtkFrame
object initializing it with the value in
label. The new widget is returned as a pointer to a GtkWidget
object. NULL
is returned on failure.
GtkFrame*
. See section 8.7 Macros defined by all objects, for
more info.
GtkFrameClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkFrame
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkGamma
type identifier.
GtkGamma
object returning the new widget as a pointer
to a GtkWidget
object. NULL
is returned on failure.
GtkGamma*
. See section 8.7 Macros defined by all objects, for
more info.
GtkGammaClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkGamma
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkHBox
, this effects the width. If this option is set then
the expand option to the gtk_box_pack
(see section 6.5 The box widget) routines
is always set to TRUE
.
GtkVBox
object.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkHBox
type identifier.
GtkHBox
object initializing it with the values in
homogeneous and spacing. The new widget is returned as a pointer
to a GtkWidget
object. NULL
is returned on failure.
GtkHBox*
. See section 8.7 Macros defined by all objects, for
more info.
GtkHBoxClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkHBox
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkHButtonBox
type identifier.
GtkHButtonBox
object returning the new widget as a pointer
to a GtkWidget
object. NULL
is returned on failure.
GtkHButtonBox*
. See section 8.7 Macros defined by all objects, for
more info.
GtkHButtonBoxClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkHButtonBox
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkHPaned
type identifier.
GtkHPaned
object returning the new widget as a pointer
to a GtkWidget
object.
GtkHPaned*
. See section 8.7 Macros defined by all objects, for
more info.
GtkHPanedClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkHPaned
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkHRuler
type identifier.
GtkHRuler
object returning the new widget as a pointer
to a GtkWidget
object. NULL
is returned on failure.
GtkHRuler*
. See section 8.7 Macros defined by all objects, for
more info.
GtkHRulerClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkHRuler
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkHScale
type identifier.
GtkHScale
object returning the new widget as a pointer
to a GtkWidget
object. NULL
is returned on failure.
GtkHScale*
. See section 8.7 Macros defined by all objects, for
more info.
GtkHScaleClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkHScale
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkHScrollbar
type identifier.
GtkHScrollbar
object returning the new widget as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkHScrollbar*
. See section 8.7 Macros defined by all objects, for
more info.
GtkHScrollbarClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkHScrollbar
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkHSeparator
type identifier.
GtkHSeparator
object returning the new widget as a pointer
to a GtkWidget
object. NULL
is returned on failure.
GtkHSeparator*
. See section 8.7 Macros defined by all objects, for
more info.
GtkHSeparatorClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkHSeparator
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkImage
type identifier.
GtkImage
object initializing it with the values in
val and mask. The new widget is returned as a pointer to a
GtkWidget
object. NULL
is returned on failure.
GtkImage*
. See section 8.7 Macros defined by all objects, for
more info.
GtkImageClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkImage
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkInputDialog
type identifier.
GtkInputDialog
object and return the new widget as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkInputDialog*
. See section 8.7 Macros defined by all objects, for
more info.
GtkInputDialogClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkInputDialog
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkItem
type identifier.
GtkItem*
. See section 8.7 Macros defined by all objects, for
more info.
GtkItemClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkItem
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkLabel
type identifier.
GtkLabel
object and initialize it with the
text in str. The new widget is returned as a pointer to a
GtkWidget
object. NULL
is returned on failure.
GtkLabel
label value to the value passed in the str
argument.
GtkLabel
label field to the variable
passed in the str argument.
GtkLabel*
. See section 8.7 Macros defined by all objects, for
more info.
GtkLabelClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkLabel
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkList
type identifier.
GtkList
object and return the new widget as a pointer to
a GtkWidget
object. NULL
is returned on failure.
GtkList*
. See section 8.7 Macros defined by all objects, for
more info.
GtkListClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkList
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkListItem
type identifier.
GtkListItem
object and return the new widget as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkListItem
object initializing with the value label.
The new widget is returned as a pointer to a GtkWidget
object.
NULL
is returned on failure.
GtkListItem*
. See section 8.7 Macros defined by all objects, for
more info.
GtkListItemClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkListItem
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkMenu
type identifier.
GtkMenu
object returning the new widget as a pointer to
a GtkWidget
. NULL
is returned on failure.
GtkMenu*
. See section 8.7 Macros defined by all objects, for
more info.
GtkMenuClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkMenu
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkMenuBar
type identifier.
GtkMenuBar
object returning the new widget as a pointer
to a GtkWidget
object. NULL
is returned on failure.
GtkMenuBar*
. See section 8.7 Macros defined by all objects, for
more info.
GtkMenuBarClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkMenuBar
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkMenuItem
type identifier.
GtkMenuItem
object returning the new widget as a pointer
to a GtkWidget
object. NULL
is returned on failure.
GtkMenuItem
object initializing it with the value in
label. The new widget is returned as a pointer to a GtkWidget
object. NULL
is returned on failure.
GtkMenuItem*
. See section 8.7 Macros defined by all objects, for
more info.
GtkMenuItemClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkMenuItem
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkMenuShell
type identifier.
GtkMenuShell*
. See section 8.7 Macros defined by all objects, for
more info.
GtkMenuShellClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkMenuShell
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkMisc
type identifier.
GtkMisc*
. See section 8.7 Macros defined by all objects, for
more info.
GtkMiscClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkMisc
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkNotebook
type identifier.
GtkNotebook
object returning the new widget as a pointer
to a GtkWidget
object. NULL
is returned on a failure.
GtkNotebook*
. See section 8.7 Macros defined by all objects, for
more info.
GtkNotebookClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkNotebook
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkOptionMenu
type identifier.
GtkOptionMenu
object returning the new widget as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkOptionMenu*
. See section 8.7 Macros defined by all objects, for
more info.
GtkOptionMenuClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkOptionMenu
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkPaned
type identifier.
GtkPaned*
. See section 8.7 Macros defined by all objects, for
more info.
GtkPanedClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkPaned
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkPixmap
type identifier.
GtkPixmap*
. See section 8.7 Macros defined by all objects, for
more info.
GtkPixmapClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkPixmap
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkPreview
type identifier.
GtkPreview
object initializing it with the values in
type. The new widget is returned as a pointer to a GtkWidget
object. NULL
is returned on failure.
GtkPreview*
. See section 8.7 Macros defined by all objects, for
more info.
GtkPreviewClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkPreview
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkProgressBar
type identifier.
GtkProgressBar
object returning the new widget as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkProgressBar
to update its visual appearance to reflect the
percentage.
GtkProgressBar*
. See section 8.7 Macros defined by all objects, for
more info.
GtkProgressBarClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkProgressBar
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkRadioButton
type identifier.
GtkRadioButton
object initializing it with the value
in the group argument. The new widget is returned as a pointer to a
GtkWidget
object. NULL
is returned on failure.
GtkRadioButton
object initializing it with the values in
the group and label arguments. The new widget is returned as a
pointer to GtkWidget
object. NULL
is returned on failure.
GtkRadioButton*
. See section 8.7 Macros defined by all objects, for
more info.
GtkRadioButtonClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkRadioButton
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkRadioMenuItem
type identifier.
GtkRadioMenuItem
object and initialize it with the
values in group. The new widget is returned as a pointer to a
GtkWidget
object. NULL
is returned on failure.
GtkRadioMenuItem*
. See section 8.7 Macros defined by all objects, for
more info.
GtkRadioMenuItemClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkRadioMenuItem
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkRange
type identifier.
GtkRange*
. See section 8.7 Macros defined by all objects, for
more info.
GtkRangeClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkRange
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkRuler
type identifier.
GtkRuler*
. See section 8.7 Macros defined by all objects, for
more info.
GtkRulerClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkRuler
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkScale
type identifier.
GtkScale*
. See section 8.7 Macros defined by all objects, for
more info.
GtkScaleClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkScale
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkScrollbar
type identifier.
GtkScrollbar*
. See section 8.7 Macros defined by all objects, for
more info.
GtkScrollbarClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkScrollbar
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkScrolledWindow
type identifier.
GtkScrolledWindow
object initializing it with the values in
adjustment and adjustment. The new widget is returned as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkScrolledWindow*
. See section 8.7 Macros defined by all objects, for
more info.
GtkScrolledWindowClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkScrolledWindow
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkSeparator
type identifier.
GtkSeparator*
. See section 8.7 Macros defined by all objects, for
more info.
GtkSeparatorClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkSeparator
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkStatusbar
type identifier.
GtkStatusbar
object returning the new widget as a pointer
to a GtkWidget
object. NULL
is returned on failure.
GtkStatusbar*
. See section 8.7 Macros defined by all objects, for
more info.
GtkStatusbarClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkStatusbar
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkTable
will
be of the same size. The child widgets will be the size of the largest child.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkTable
type identifier.
GtkTable
object initializing it with the values in
rows, columns and homogeneous. The new widget is returned
as a pointer to a GtkWidget
. NULL
is returned on failure.
GtkTable*
. See section 8.7 Macros defined by all objects, for
more info.
GtkTableClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkTable
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkText
type identifier.
GtkText
object initializing it with the values in
hadj and vadj. The new widget is returned as a pointer to a
GtkWidget
. NULL
is returned on failure.
GtkText*
. See section 8.7 Macros defined by all objects, for
more info.
GtkTextClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkText
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Another form of button (see section 6.7 The button widget) with two states: on and off. The appearance is that of a button which stays pressed on the first click, and is released on the second click.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkToggleButton
type identifier.
GtkToggleButton
object returning the new widget as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkToggleButton
object initializing it with the values in
label. The new widget is returned as a pointer to a GtkWidget
object. NULL
is returned on failure.
GtkToggleButton*
. See section 8.7 Macros defined by all objects, for
more info.
GtkToggleButtonClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkToggleButton
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkToolbar
type identifier.
GtkToolbar
object initializing it with the values
orientation and style. NULL
is returned on failure.
GtkToolbar*
. See section 8.7 Macros defined by all objects, for
more info.
GtkToolbarClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkToolbar
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkTooltips
object returning the new widget as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkTooltips*
. See section 8.7 Macros defined by all objects, for
more info.
GtkTooltipsClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkTooltips
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkTree
type identifier.
GtkTree
object returning the new widget as a pointer to
a GtkWidget
object. NULL
is returned on failure.
GtkTree*
. See section 8.7 Macros defined by all objects, for
more info.
GtkTreeClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkTree
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkTreeItem
type identifier.
GtkTreeItem
object returning the new widget as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkTreeItem
object initializing it with the values in
label. The new widget is returned as a pointer to a GtkWidget
object. NULL
is returned on failure.
GtkTreeItem*
. See section 8.7 Macros defined by all objects, for
more info.
GtkTreeItemClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkTreeItem
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkVBox
, this refers to the height. If this option is set
then the expand option to the gtk_box_pack
(see section 6.5 The box widget)
routines is always turned on.
GtkVBox
object.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkVBox
type identifier.
GtkVBox
object initializing it with the values in
homogeneous and spacing. The new widget is returned as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkVBox*
. See section 8.7 Macros defined by all objects, for
more info.
GtkVBoxClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkVBox
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkVButtonBox
type identifier.
GtkVButtonBox
object returning the new widget as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkVButtonBox*
. See section 8.7 Macros defined by all objects, for
more info.
GtkVButtonBoxClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkVButtonBox
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkViewport
type identifier.
GtkViewport*
. See section 8.7 Macros defined by all objects, for
more info.
GtkViewportClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkViewport
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkVPaned
type identifier.
GtkVPaned
object returning the new widget as a pointer
to a GtkWidget
object. NULL
is returned on failure.
GtkVPaned*
. See section 8.7 Macros defined by all objects, for
more info.
GtkVPanedClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkVPaned
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkVRuler
type identifier.
GtkVRuler
object returning the new widget as a pointer to
a GtkWidget
object. NULL
is returned on failure.
GtkVRuler*
. See section 8.7 Macros defined by all objects, for
more info.
GtkVRulerClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkVRuler
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkVScale
type identifier.
GtkVScale
object returning the new widget as a pointer
to a GtkWidget
object. NULL
is returned on failure.
GtkVScale*
. See section 8.7 Macros defined by all objects, for
more info.
GtkVScaleClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkVScale
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkVScrollbar
type identifier.
GtkVScrollbar
object initializing it with the values in
adjustment. The new widget is returned as a pointer to a GtkWidget
object. NULL
is returned on failure.
GtkVScrollbar*
. See section 8.7 Macros defined by all objects, for
more info.
GtkVScrollbarClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkVScrollbar
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkVSeparator
type identifier.
GtkVSeparator
object and return the new widget as a
pointer to a GtkWidget
object. NULL
is returned on failure.
GtkVSeparator*
. See section 8.7 Macros defined by all objects, for
more info.
GtkVSeparatorClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkVSeparator
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkWidget
type identifier.
GtkWidget*
. See section 8.7 Macros defined by all objects, for
more info.
GtkWidgetClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkWidget
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GTK_WINDOW_TOPLEVEL
GTK_WINDOW_TOPLEVEL
is usually used for the main application
window that will remain for the entire application run.
GTK_WINDOW_DIALOG
GTK_WINDOW_DIALOG
is usually used for transient
windows. These windows will open up, gather some input or provide some
application specific updates, then close. The window manager is free not
to provide all the 'normal' window functions to this window.
GTK_WINDOW_POPUP
GTK_WINDOW_POPUP
is usually used for transient windows.
These windows are typically used for when no user interaction is required,
to notify the user of some condition. Other uses for these types of windows
are for 'about windows', startup windows and the like. Typically the window
manager will not provide the usual widgets that surround the
window. At the most all that will be provided is a border. Also note that
windows that set this type will not be in any window list of the window
manager. Though this window will not get the kill and close widgets
of the window manager they still can receive said events and should be
taken into account.
GTK_WINDOW_POPUP
there is a strong possibility that this will text
will not be seen.
GTK_WIN_POS_NONE
GTK_WIN_POS_CENTER
GTK_WIN_POS_MOUSE
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkWindow
type identifier.
GtkWindow
object. The new widget is returned as a
pointer to a GtkWidget
object. NULL
is returned on failure.
The type can be one of GTK_WINDOW_TOPLEVEL
,
GTK_WINDOW_DIALOG
or, GTK_WINDOW_POPUP
. The type
value determines how this widget will interact with the window manager.
GtkWindow
structure directly.
GtkWindow*
. See section 8.7 Macros defined by all objects, for
more info.
GtkWindowClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkWindow
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
7.1 The accelerator table object 7.2 The adjustment object 7.3 The GC object 7.4 The data object 7.5 The style object
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkAdjustment
type identifier.
GtkGtkAdjustment*
. See section 8.7 Macros defined by all objects, for
more info.
GtkGtkAdjustmentClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkGtkAdjustment
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GtkData
type identifier.
GtkData*
. See section 8.7 Macros defined by all objects, for
more info.
GtkDataClass*
. See section 8.7 Macros defined by all objects,
for more info.
GtkData
object. See section 8.7 Macros defined by all objects, for more info.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
gtk_init
function. The arguments
you pass to this function should be the same arguments that were passed to
your application. This function will parse the arguments that it understands
and handle initializing the GDK library for you.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
int main (int argc, char *argv[]) { @dots{Any local variables or non GTK/GDK initialization} /* Initialize GTK. */ gtk_init(&argc, &argc); } |
gtk_exit
will call the
systems exit
function passing error_code as the parameter.
gtk_main
function to exit,
thereby allowing your application to exit.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
gtk_rc_parse
function will handle this for
you.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There are three macros that are defined by all object types. The first
two are used for performing casts and the last is for querying whether
an object is of a particular type. These macros are both conveniences
and debugging tools. If the GTK library was compiled with NDEBUG
defined as a preprocessor symbol (via the -DNDEBUG to cc), then the
macros check the object type and emit a warning if the cast is
invalid. Doing such checking is fairly expensive since the cast macros
are used everywhere in GTK and would normally be turned off in a public
release of a product. Note: The functions below are indeed macros, but
they may be considered functions for most purposes.
Gtk<ObjectType>*
. This function is
provided in order to be able to provide checking during development
stages of code development since it is possible to examine the actual
type of object (using gtk_type_is_a
) before performing the cast.
Gtk<ObjectType>Class*
. Like
GTK_<ObjectType>
, this function is, in reality, a macro.
Gtk<ObjectType>
object. This function is, in reality, a macro wrapper around the
gtk_type_is_a
function (see section 3. Types).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
9.1 The simplest GTK program 9.2 Hello world in GTK 9.3 An enhanced hello world 9.4 Making Hello World II robust
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The 16 line GTK program shown below is just about the simplest possible program which uses GTK. (Well, technically, you don't have to create the window and it would still be a program which uses GTK). The program, when compiled and run, will create a single window 200x200 pixels in size. The program does not exit until its is explicitly killed using the shell or a window manager function.
#include <gtk/gtk.h> int main (int argc, char *argv[]) { GtkWidget *window; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_show (window); gtk_main (); return 0; } |
The first point of interest in this program is the standard initialization line.
gtk_init (&argc, &argv); |
Almost every GTK program will contain such a line. GTK will initialize itself and GDK and remove any command line arguments it recognizes from argc and argv.
The next two lines of code create and display a window.
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_show (window); |
The GTK_WINDOW_TOPLEVEL
argument specifies that we want the
window to undergo window manager decoration and placement. One might be
lead to think that the window, since it has no children, would be 0x0
pixels in size. But, this is not the case because a window that has no
children defaults to 200x200 pixels in size. Mainly because 0x0 windows
are annoying to manipulate or even see in some cases.
The last line enters the GTK main processing loop.
gtk_main (); |
Normally, gtk_main
is called once and the program should exit
when it returns. See section 8.1 Initializing and exiting GTK.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <gtk/gtk.h> int main (int argc, char *argv[]) { GtkWidget *window; GtkWidget *label; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_container_border_width (GTK_CONTAINER (window), 10); label = gtk_label_new ("Hello World"); gtk_container_add (GTK_CONTAINER (window), label); gtk_widget_show (label); gtk_widget_show (window); gtk_main (); return 0; } |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include "gtk.h" void hello (void) { g_print ("Hello World\n"); gtk_exit (0); } int main (int argc, char *argv[]) { GtkWidget *window; GtkWidget *button; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_container_border_width (GTK_CONTAINER (window), 10); button = gtk_button_new_with_label ("Hello World"); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (hello), NULL); gtk_container_add (GTK_CONTAINER (window), button); gtk_widget_show (button); gtk_widget_show (window); gtk_main (); return 0; } |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include "gtk.h" void hello (void) { g_print ("Hello World\n"); gtk_exit (0); } void destroy (void) { gtk_exit (0); } int main (int argc, char *argv[]) { GtkWidget *window; GtkWidget *button; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (destroy), NULL); gtk_container_border_width (GTK_CONTAINER (window), 10); button = gtk_button_new_with_label ("Hello World"); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (hello), NULL); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); gtk_container_add (GTK_CONTAINER (window), button); gtk_widget_show (button); gtk_widget_show (window); gtk_main (); return 0; } |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Objects (or the GtkObject
type) and the class hierarchy in
general is implemented via a hierarchy of structs and type casting. Be
aware that when classes are mentioned it is the conceptual idea of
classes that is being referred to. GTK is written entirely in C which
provides no direct support for classes.
The first part to the class mechanism is the object fields. These are
fields that will be used on a per object basis. For example, the widget
type contains a field for the widgets parent. Every derived type needs a
reference to its parent type. A descendant class of GtkObject
would define itself like:
struct Descendant { GtkObject object; ... }; |
It is important to note that the GtkObject
field needs to appear
first in the descendant type structure. This allows pointers to objects
of type Descendant
to be cast to pointers to GtkObject
's
and vice-versa.
The second part to the class mechanism is the class fields. These fields
are defined on a per class basis. In the case of widgets, the class
fields are all the "virtual" functions for widgets. The
GtkObject
class defines the destroy
virtual function and
the necessary fields for the signal mechanism as well as a field for
determining the runtime type of an object. A virtual function is
semantically the same as it is in C++. That is, the actual function that
is called is determined based on the type of the object. Or, more
specifically, the actual function call depends on the class structure
that is pointed to by the klass
field of the GtkObject
structure.
To see how the class fields work it is necessary to see the object
fields for a GtkObject
. The GtkObject
type is defined as
follows:
typedef struct _GtkObject GtkObject; struct _GtkObject { guint32 flags; GtkObjectClass *klass; gpointer object_data; }; |
The class
field actually points to a class structure derived from
GtkObjectClass
. By convention, each new type defines its own
class structure even if it is unnecessary. As an example, the
hypothetical Descendant
class would define its class structure
as:
struct DescendantClass { GtkObjectClass parent_class; ... }; |
It is convention to name the parent class field (GtkObjectClass
in this case), parent_class
. For the same reason as stated above
for the object structure, the parent class field must be the first field
in the class structure.
Note: GTK assumes that the first field in a structure will be placed by the compiler at the start of the structure. This is certainly true for gcc, however, from my precursory reading of the C standard I was unable to come to a definite conclusion as to whether this was required or simply done for simplicity. I'm not too worried about this assumption, though, as every C compiler I've ever encountered would work with GTK.
The flags
field of the GtkObject
structure is used to keep
track of a relatively few object flags and is also used by the
GtkWidget
type to store additional flags. At this time, the upper
16 bits of the flags field are reserved but unused.
The object_data
field of the GtkObject
structure is an
opaque pointer used by the object data mechanism. In truth, it is a
pointer to the beginning of the data list which is composed of the
following structures.
typedef struct _GtkObjectData GtkObjectData; struct _GtkObjectData { guint id; gpointer data; GtkObjectData *next; }; |
The data mechanism allows arbitrary data to be associated with a
character string key in any object. A hash table is used to transform
the character string key into the data id and then a search through the
list is made to see if the data exists. The assumption being that the
data list will usually be short and therefore a linear search is
OK. Future work on the data mechanism might make use of a resizable
array instead of a linked list. This would shrink the overhead of the
GtkObjectData
structure by 4 bytes on 32 bit architectures.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Jump to: | *
G |
---|
Jump to: | *
G |
---|
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Jump to: | C O S T U W |
---|
Jump to: | C O S T U W |
---|
[Top] | [Contents] | [Index] | [ ? ] |
1. Copying
2. What is GTK?
3. Types
3.1 Introduction to the Type System4. Objects
3.2 Basic Concepts
3.3 Simple Types
3.4 Enumerations and Flags
3.5 Strings
3.6 Boxed Types
3.7 Callbacks
3.8 Composite Types
4.1 Object functions5. Signals Overview
6. Widget Overview
6.1 The alignment widget7. Utility objects
6.1.1 Description6.2 The arrow widget
6.1.2 Options
6.1.3 Signals
6.1.4 Functions
6.2.1 Description6.3 The aspect frame widget
6.2.2 Options
6.2.3 Signals
6.2.4 Functions
6.3.1 Description6.4 The bin widget
6.3.2 Options
6.3.3 Signals
6.3.4 Functions
6.4.1 Description6.5 The box widget
6.4.2 Options
6.4.3 Signals
6.4.4 Functions
6.5.1 Description6.6 The button box widget
6.5.2 Options
6.5.3 Signals
6.5.4 Functions
6.6.1 Description6.7 The button widget
6.6.2 Options
6.6.3 Signals
6.6.4 Functions
6.7.1 Description6.8 The check button widget
6.7.2 Signals
6.7.3 Functions
6.8.1 Description6.9 The check menu item widget
6.8.2 Options
6.8.3 Signals
6.8.4 Functions
6.9.1 Description6.10 The compound list widget
6.9.2 Options
6.9.3 Signals
6.9.4 Functions
6.10.1 Description6.11 The color selector widget
6.10.2 Options
6.10.3 Signals
6.10.4 Functions
6.11.1 Description6.12 The combo widget
6.11.2 Options
6.11.3 Signals
6.11.4 Functions
6.12.1 Description6.13 The container widget
6.12.2 Options
6.12.3 Signals
6.12.4 Functions
6.13.1 Description6.14 The multi-column tree widget
6.13.2 Options
6.13.3 Signals
6.13.4 Functions
6.14.1 Description6.15 The curve widget
6.14.2 Options
6.14.3 Signals
6.14.4 Functions
6.15.1 Description6.16 The gamma curve widget
6.15.2 Options
6.15.3 Signals
6.15.4 Functions
6.16.1 Description6.17 The dialog widget
6.16.2 Options
6.16.3 Signals
6.16.4 Functions
6.17.1 Description6.18 The drawing area widget
6.17.2 Options
6.17.3 Signals
6.17.4 Functions
6.18.1 Description6.19 The entry widget
6.18.2 Options
6.18.3 Signals
6.18.4 Functions
6.19.1 Description6.20 The event box widget
6.19.2 Options
6.19.3 Signals
6.19.4 Functions
6.20.1 Description6.21 The file selection dialog widget
6.20.2 Options
6.20.3 Signals
6.20.4 Functions
6.21.1 Description6.22 The fixed widget
6.21.2 Options
6.21.3 Signals
6.21.4 Functions
6.22.1 Description6.23 The frame widget
6.22.2 Options
6.22.3 Signals
6.22.4 Functions
6.23.1 Options6.24 The gamma widget
6.23.2 Description
6.23.3 Signals
6.23.4 Functions
6.24.1 Description6.25 The horizontal box widget
6.24.2 Options
6.24.3 Signals
6.24.4 Functions
6.25.1 Description6.26 The horizontal button box widget
6.25.2 Options
6.25.3 Signals
6.25.4 Functions
6.26.1 Description6.27 The horizontal paned widget
6.26.2 Options
6.26.3 Signals
6.26.4 Functions
6.27.1 Description6.28 The horizontal ruler widget
6.27.2 Options
6.27.3 Signals
6.27.4 Functions
6.28.1 Description6.29 The horizontal scale widget
6.28.2 Options
6.28.3 Signals
6.28.4 Functions
6.29.1 Description6.30 The horizontal scrollbar widget
6.29.2 Options
6.29.3 Signals
6.29.4 Functions
6.30.1 Description6.31 The horizontal separator widget
6.30.2 Options
6.30.3 Signals
6.30.4 Functions
6.31.1 Description6.32 The image widget
6.31.2 Options
6.31.3 Signals
6.31.4 Functions
6.32.1 Description6.33 The input dialog widget
6.32.2 Options
6.32.3 Signals
6.32.4 Functions
6.33.1 Description6.34 The item widget
6.33.2 Options
6.33.3 Signals
6.33.4 Functions
6.34.1 Description6.35 The label widget
6.34.2 Signals
6.34.3 Functions
6.35.1 Description6.36 The list widget
6.35.2 Options
6.35.3 Signals
6.35.4 Functions
6.36.1 Description6.37 The list item widget
6.36.2 Signals
6.36.3 Functions
6.37.1 Description6.38 The menu widget
6.37.2 Options
6.37.3 Signals
6.37.4 Functions
6.38.1 Description6.39 The menu bar widget
6.38.2 Options
6.38.3 Signals
6.38.4 Functions
6.39.1 Description6.40 The menu item widget
6.39.2 Options
6.39.3 Signals
6.39.4 Functions
6.40.1 Description6.41 The menu shell widget
6.40.2 Options
6.40.3 Signals
6.40.4 Functions
6.41.1 Description6.42 The misc widget
6.41.2 Options
6.41.3 Signals
6.41.4 Functions
6.42.1 Description6.43 The notebook widget
6.42.2 Options
6.42.3 Signals
6.42.4 Functions
6.43.1 Description6.44 The option menu widget
6.43.2 Options
6.43.3 Signals
6.43.4 Functions
6.44.1 Description6.45 The paned widget
6.44.2 Options
6.44.3 Signals
6.44.4 Functions
6.45.1 Description6.46 The pixmap widget
6.45.2 Options
6.45.3 Signals
6.45.4 Functions
6.46.1 Description6.47 The preview widget
6.46.2 Options
6.46.3 Signals
6.46.4 Functions
6.47.1 Description6.48 The progress bar widget
6.47.2 Options
6.47.3 Signals
6.47.4 Functions
6.48.1 Description6.49 The radio button widget
6.48.2 Options
6.48.3 Signals
6.48.4 Functions
6.49.1 Description6.50 The radio button widget
6.49.2 Options
6.49.3 Signals
6.49.4 Functions
6.50.1 Description6.51 The range widget
6.50.2 Options
6.50.3 Signals
6.50.4 Functions
6.51.1 Description6.52 The ruler widget
6.51.2 Options
6.51.3 Signals
6.51.4 Functions
6.52.1 Description6.53 The scale widget
6.52.2 Options
6.52.3 Signals
6.52.4 Functions
6.53.1 Description6.54 The scrollbar widget
6.53.2 Options
6.53.3 Signals
6.53.4 Functions
6.54.1 Description6.55 The scrolled window widget
6.54.2 Options
6.54.3 Signals
6.54.4 Functions
6.55.1 Description6.56 The separator widget
6.55.2 Options
6.55.3 Signals
6.55.4 Functions
6.56.1 Description6.57 The statusbar widget
6.56.2 Options
6.56.3 Signals
6.56.4 Functions
6.57.1 Description6.58 The table widget
6.57.2 Options
6.57.3 Signals
6.57.4 Functions
6.58.1 Description6.59 The text widget
6.58.2 Options
6.58.3 Signals
6.58.4 Functions
6.59.1 Description6.60 The toggle button widget
6.59.2 Signals
6.59.3 Functions
6.60.1 Description6.61 The tool bar widget
6.60.2 Options
6.60.3 Signals
6.60.4 Functions
6.61.1 Description6.62 The tool tips widget
6.61.2 Options
6.61.3 Signals
6.61.4 Functions
6.62.1 Description6.63 The tree widget
6.62.2 Options
6.62.3 Signals
6.62.4 Functions
6.63.1 Description6.64 The tree item widget
6.63.2 Options
6.63.3 Signals
6.63.4 Functions
6.64.1 Description6.65 The vertical box widget
6.64.2 Options
6.64.3 Signals
6.64.4 Functions
6.65.1 Description6.66 The vertical button box widget
6.65.2 Options
6.65.3 Signals
6.65.4 Functions
6.66.1 Description6.67 The viewport widget
6.66.2 Options
6.66.3 Signals
6.66.4 Functions
6.67.1 Description6.68 The vertical paned widget
6.67.2 Signals
6.67.3 Functions
6.68.1 Description6.69 The vertical ruler widget
6.68.2 Options
6.68.3 Signals
6.68.4 Functions
6.69.1 Description6.70 The vertical ruler widget
6.69.2 Options
6.69.3 Signals
6.69.4 Functions
6.70.1 Description6.71 The vertical scrollbar widget
6.70.2 Options
6.70.3 Signals
6.70.4 Functions
6.71.1 Description6.72 The vertical separator widget
6.71.2 Options
6.71.3 Signals
6.71.4 Functions
6.72.1 Description6.73 The base widget
6.72.2 Signals
6.72.3 Functions
6.73.1 Description6.74 The window widget
6.73.2 Signals
6.73.3 Functions
6.74.1 Description
6.74.2 Options
6.74.3 Signals
6.74.4 Functions
7.1 The accelerator table object8. Initialization, exit and other features
7.1.1 Description7.2 The adjustment object
7.1.2 Functions
7.2.1 Description7.3 The GC object
7.2.2 Functions
7.3.1 Description7.4 The data object
7.3.2 Functions
7.4.1 Description7.5 The style object
7.4.2 Functions
7.5.1 Description
7.5.2 Functions
8.1 Initializing and exiting GTK9. Using GTK
8.1.1 Initializing8.2 Customization of the library
8.1.2 Exiting
8.1.3 Functions
8.2.1 Description8.3 Simplified menu creation
8.2.2 Functions
8.4 Simplified tree creation
8.5 Pop up help mechanism
8.5.1 Description8.6 Resource Files
8.7 Macros defined by all objects
9.1 The simplest GTK program10. Object internals
9.2 Hello world in GTK
9.3 An enhanced hello world
9.4 Making Hello World II robust
11. Signal internals
12. Widget internals
Function Index
Concept Index
[Top] | [Contents] | [Index] | [ ? ] |
1. Copying
2. What is GTK?
3. Types
4. Objects
5. Signals Overview
6. Widget Overview
7. Utility objects
8. Initialization, exit and other features
9. Using GTK
10. Object internals
11. Signal internals
12. Widget internals
Function Index
Concept Index
[Top] | [Contents] | [Index] | [ ? ] |
Button | Name | Go to | From 1.2.3 go to |
---|---|---|---|
[ < ] | Back | previous section in reading order | 1.2.2 |
[ > ] | Forward | next section in reading order | 1.2.4 |
[ << ] | FastBack | previous or up-and-previous section | 1.1 |
[ Up ] | Up | up section | 1.2 |
[ >> ] | FastForward | next or up-and-next section | 1.3 |
[Top] | Top | cover (top) of document | |
[Contents] | Contents | table of contents | |
[Index] | Index | concept index | |
[ ? ] | About | this page |