Note that any class that installs templates must call gtk_widget_init_template()
in the widget’s instance initializer.
Since: 3.10
GObject * gtk_widget_get_template_child (GtkWidget *widget
,GType widget_type
,const gchar *name
);
Fetch an object build from the template XML for widget_type
in this widget
instance.
This will only report children which were previously declared with
gtk_widget_class_bind_template_child_full()
or one of its
variants.
This function is only meant to be called for code which is private to the widget_type
which
declared the child and is meant for language bindings which cannot easily make use
of the GObject structure offsets.
#define gtk_widget_class_bind_template_child(widget_class, TypeName, member_name)
Binds a child widget defined in a template to the widget_class
.
This macro is a convenience wrapper around the
gtk_widget_class_bind_template_child_full()
function.
This macro will use the offset of the member_name
inside the TypeName
instance structure.
widget_class |
||
TypeName |
the type name of this widget |
|
member_name |
name of the instance member in the instance struct for |
Since: 3.10
#define gtk_widget_class_bind_template_child_internal(widget_class, TypeName, member_name)
Binds a child widget defined in a template to the widget_class
, and
also makes it available as an internal child in GtkBuilder, under the
name member_name
.
This macro is a convenience wrapper around the
gtk_widget_class_bind_template_child_full()
function.
This macro will use the offset of the member_name
inside the TypeName
instance structure.
widget_class |
||
TypeName |
the type name, in CamelCase |
|
member_name |
name of the instance member in the instance struct for |
Since: 3.10
#define gtk_widget_class_bind_template_child_private(widget_class, TypeName, member_name)
Binds a child widget defined in a template to the widget_class
.
This macro is a convenience wrapper around the
gtk_widget_class_bind_template_child_full()
function.
This macro will use the offset of the member_name
inside the TypeName
private data structure (it uses G_PRIVATE_OFFSET()
, so the private struct
must be added with G_ADD_PRIVATE()
).
widget_class |
||
TypeName |
the type name of this widget |
|
member_name |
name of the instance private member in the private struct for |
Since: 3.10
#define gtk_widget_class_bind_template_child_internal_private(widget_class, TypeName, member_name)
Binds a child widget defined in a template to the widget_class
, and
also makes it available as an internal child in GtkBuilder, under the
name member_name
.
This macro is a convenience wrapper around the
gtk_widget_class_bind_template_child_full()
function.
This macro will use the offset of the member_name
inside the TypeName
private data structure.
widget_class |
||
TypeName |
the type name, in CamelCase |
|
member_name |
name of the instance private member on the private struct for |
Since: 3.10
void gtk_widget_class_bind_template_child_full (GtkWidgetClass *widget_class
,const gchar *name
,gboolean internal_child
,gssize struct_offset
);
Automatically assign an object declared in the class template XML to be set to a location
on a freshly built instance’s private data, or alternatively accessible via gtk_widget_get_template_child()
.
The struct can point either into the public instance, then you should use G_STRUCT_OFFSET(WidgetType, member)
for struct_offset
, or in the private struct, then you should use G_PRIVATE_OFFSET(WidgetType, member).
An explicit strong reference will be held automatically for the duration of your
instance’s life cycle, it will be released automatically when GObjectClass.dispose()
runs
on your instance and if a struct_offset
that is != 0 is specified, then the automatic location
in your instance public or private data will be set to NULL
. You can however access an automated child
pointer the first time your classes GObjectClass.dispose()
runs, or alternatively in
GtkWidgetClass.destroy()
.
If internal_child
is specified, GtkBuildableIface.get_internal_child()
will be automatically
implemented by the GtkWidget class so there is no need to implement it manually.
The wrapper macros gtk_widget_class_bind_template_child()
, gtk_widget_class_bind_template_child_internal()
,
gtk_widget_class_bind_template_child_private()
and gtk_widget_class_bind_template_child_internal_private()
might be more convenient to use.
Note that this must be called from a composite widget classes class
initializer after calling gtk_widget_class_set_template()
.
widget_class |
||
name |
The “id” of the child defined in the template XML |
|
internal_child |
Whether the child should be accessible as an “internal-child” when this class is used in GtkBuilder XML |
|
struct_offset |
The structure offset into the composite widget’s instance public or private structure where the automated child pointer should be set, or 0 to not assign the pointer. |
Since: 3.10
#define gtk_widget_class_bind_template_callback(widget_class, callback)
Binds a callback function defined in a template to the widget_class
.
This macro is a convenience wrapper around the
gtk_widget_class_bind_template_callback_full()
function.
Since: 3.10
void gtk_widget_class_bind_template_callback_full (GtkWidgetClass *widget_class
,const gchar *callback_name
,GCallback callback_symbol
);
Declares a callback_symbol
to handle callback_name
from the template XML
defined for widget_type
. See gtk_builder_add_callback_symbol()
.
Note that this must be called from a composite widget classes class
initializer after calling gtk_widget_class_set_template()
.
widget_class |
||
callback_name |
The name of the callback as expected in the template XML |
|
callback_symbol |
The callback symbol. |
[scope async] |
Since: 3.10
void gtk_widget_class_set_connect_func (GtkWidgetClass *widget_class
,GtkBuilderConnectFunc connect_func
,gpointer connect_data
,GDestroyNotify connect_data_destroy
);
For use in language bindings, this will override the default GtkBuilderConnectFunc to be used when parsing GtkBuilder XML from this class’s template data.
Note that this must be called from a composite widget classes class
initializer after calling gtk_widget_class_set_template()
.
widget_class |
||
connect_func |
The GtkBuilderConnectFunc to use when connecting signals in the class template |
|
connect_data |
The data to pass to |
|
connect_data_destroy |
The GDestroyNotify to free |
Since: 3.10
struct GtkWidgetClass { GInitiallyUnownedClass parent_class; guint activate_signal; /* seldomly overidden */ void (*dispatch_child_properties_changed) (GtkWidget *widget, guint n_pspecs, GParamSpec **pspecs); /* basics */ void (* destroy) (GtkWidget *widget); void (* show) (GtkWidget *widget); void (* show_all) (GtkWidget *widget); void (* hide) (GtkWidget *widget); void (* map) (GtkWidget *widget); void (* unmap) (GtkWidget *widget); void (* realize) (GtkWidget *widget); void (* unrealize) (GtkWidget *widget); void (* size_allocate) (GtkWidget *widget, GtkAllocation *allocation); void (* state_changed) (GtkWidget *widget, GtkStateType previous_state); void (* state_flags_changed) (GtkWidget *widget, GtkStateFlags previous_state_flags); void (* parent_set) (GtkWidget *widget, GtkWidget *previous_parent); void (* hierarchy_changed) (GtkWidget *widget, GtkWidget *previous_toplevel); void (* style_set) (GtkWidget *widget, GtkStyle *previous_style); void (* direction_changed) (GtkWidget *widget, GtkTextDirection previous_direction); void (* grab_notify) (GtkWidget *widget, gboolean was_grabbed); void (* child_notify) (GtkWidget *widget, GParamSpec *child_property); gboolean (* draw) (GtkWidget *widget, cairo_t *cr); /* size requests */ GtkSizeRequestMode (* get_request_mode) (GtkWidget *widget); void (* get_preferred_height) (GtkWidget *widget, gint *minimum_height, gint *natural_height); void (* get_preferred_width_for_height) (GtkWidget *widget, gint height, gint *minimum_width, gint *natural_width); void (* get_preferred_width) (GtkWidget *widget, gint *minimum_width, gint *natural_width); void (* get_preferred_height_for_width) (GtkWidget *widget, gint width, gint *minimum_height, gint *natural_height); /* Mnemonics */ gboolean (* mnemonic_activate) (GtkWidget *widget, gboolean group_cycling); /* explicit focus */ void (* grab_focus) (GtkWidget *widget); gboolean (* focus) (GtkWidget *widget, GtkDirectionType direction); /* keyboard navigation */ void (* move_focus) (GtkWidget *widget, GtkDirectionType direction); gboolean (* keynav_failed) (GtkWidget *widget, GtkDirectionType direction); /* events */ gboolean (* event) (GtkWidget *widget, GdkEvent *event); gboolean (* button_press_event) (GtkWidget *widget, GdkEventButton *event); gboolean (* button_release_event) (GtkWidget *widget, GdkEventButton *event); gboolean (* scroll_event) (GtkWidget *widget, GdkEventScroll *event); gboolean (* motion_notify_event) (GtkWidget *widget, GdkEventMotion *event); gboolean (* delete_event) (GtkWidget *widget, GdkEventAny *event); gboolean (* destroy_event) (GtkWidget *widget, GdkEventAny *event); gboolean (* key_press_event) (GtkWidget *widget, GdkEventKey *event); gboolean (* key_release_event) (GtkWidget *widget, GdkEventKey *event); gboolean (* enter_notify_event) (GtkWidget *widget, GdkEventCrossing *event); gboolean (* leave_notify_event) (GtkWidget *widget, GdkEventCrossing *event); gboolean (* configure_event) (GtkWidget *widget, GdkEventConfigure *event); gboolean (* focus_in_event) (GtkWidget *widget, GdkEventFocus *event); gboolean (* focus_out_event) (GtkWidget *widget, GdkEventFocus *event); gboolean (* map_event) (GtkWidget *widget, GdkEventAny *event); gboolean (* unmap_event) (GtkWidget *widget, GdkEventAny *event); gboolean (* property_notify_event) (GtkWidget *widget, GdkEventProperty *event); gboolean (* selection_clear_event) (GtkWidget *widget, GdkEventSelection *event); gboolean (* selection_request_event) (GtkWidget *widget, GdkEventSelection *event); gboolean (* selection_notify_event) (GtkWidget *widget, GdkEventSelection *event); gboolean (* proximity_in_event) (GtkWidget *widget, GdkEventProximity *event); gboolean (* proximity_out_event) (GtkWidget *widget, GdkEventProximity *event); gboolean (* visibility_notify_event) (GtkWidget *widget, GdkEventVisibility *event); gboolean (* window_state_event) (GtkWidget *widget, GdkEventWindowState *event); gboolean (* damage_event) (GtkWidget *widget, GdkEventExpose *event); gboolean (* grab_broken_event) (GtkWidget *widget, GdkEventGrabBroken *event); /* selection */ void (* selection_get) (GtkWidget *widget, GtkSelectionData *selection_data, guint info, guint time_); void (* selection_received) (GtkWidget *widget, GtkSelectionData *selection_data, guint time_); /* Source side drag signals */ void (* drag_begin) (GtkWidget *widget, GdkDragContext *context); void (* drag_end) (GtkWidget *widget, GdkDragContext *context); void (* drag_data_get) (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint time_); void (* drag_data_delete) (GtkWidget *widget, GdkDragContext *context); /* Target side drag signals */ void (* drag_leave) (GtkWidget *widget, GdkDragContext *context, guint time_); gboolean (* drag_motion) (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time_); gboolean (* drag_drop) (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time_); void (* drag_data_received) (GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint time_); gboolean (* drag_failed) (GtkWidget *widget, GdkDragContext *context, GtkDragResult result); /* Signals used only for keybindings */ gboolean (* popup_menu) (GtkWidget *widget); /* If a widget has multiple tooltips/whatsthis, it should show the * one for the current focus location, or if that doesn't make * sense, should cycle through them showing each tip alongside * whatever piece of the widget it applies to. */ gboolean (* show_help) (GtkWidget *widget, GtkWidgetHelpType help_type); /* accessibility support */ AtkObject * (* get_accessible) (GtkWidget *widget); void (* screen_changed) (GtkWidget *widget, GdkScreen *previous_screen); gboolean (* can_activate_accel) (GtkWidget *widget, guint signal_id); void (* composited_changed) (GtkWidget *widget); gboolean (* query_tooltip) (GtkWidget *widget, gint x, gint y, gboolean keyboard_tooltip, GtkTooltip *tooltip); void (* compute_expand) (GtkWidget *widget, gboolean *hexpand_p, gboolean *vexpand_p); void (* adjust_size_request) (GtkWidget *widget, GtkOrientation orientation, gint *minimum_size, gint *natural_size); void (* adjust_size_allocation) (GtkWidget *widget, GtkOrientation orientation, gint *minimum_size, gint *natural_size, gint *allocated_pos, gint *allocated_size); void (* style_updated) (GtkWidget *widget); gboolean (* touch_event) (GtkWidget *widget, GdkEventTouch *event); void (* get_preferred_height_and_baseline_for_width) (GtkWidget *widget, gint width, gint *minimum_height, gint *natural_height, gint *minimum_baseline, gint *natural_baseline); void (* adjust_baseline_request)(GtkWidget *widget, gint *minimum_baseline, gint *natural_baseline); void (* adjust_baseline_allocation) (GtkWidget *widget, gint *baseline); void (*queue_draw_region) (GtkWidget *widget, const cairo_region_t *region); };
guint |
The signal to emit when a widget of this class is
activated, |
|
Seldomly overidden. |
||
Signals that all holders of a reference to the widget should release the reference that they hold. |
||
Signal emitted when widget is shown |
||
Recursively shows a widget, and any child widgets (if the widget is a container). |
||
Signal emitted when widget is hidden. |
||
Signal emitted when widget is going to be mapped, that is
when the widget is visible (which is controlled with
|
||
Signal emitted when widget is going to be unmapped, which means that either it or any of its parents up to the toplevel widget have been set as hidden. |
||
Signal emitted when widget is associated with a
GdkWindow, which means that |
||
Signal emitted when the GdkWindow associated with
widget is destroyed, which means that |
||
Signal emitted to get the widget allocation. |
||
Signal emitted when the widget state changes. Deprecated: 3.0 |
||
Signal emitted when the widget state changes,
see |
||
Signal emitted when a new parent has been set on a widget. |
||
Signal emitted when the anchored state of a widget changes. |
||
Signal emitted when a new style has been set on a widget. Deprecated: 3.0 |
||
Signal emitted when the text direction of a widget changes. |
||
Signal emitted when a widget becomes shadowed by a GTK+ grab (not a pointer or keyboard grab) on another widget, or when it becomes unshadowed due to a grab being removed. |
||
Signal emitted for each child property that has changed on an object. |
||
Signal emitted when a widget is supposed to render itself. |
||
This allows a widget to tell its parent container whether
it prefers to be allocated in |
||
This is called by containers to obtain the minimum
and natural height of a widget. A widget that does not actually trade
any height for width or width for height only has to implement these
two virtual methods ( |
||
This is analogous to
|
||
This is called by containers to obtain the minimum and natural width of a widget. A widget will never be allocated a width less than its minimum and will only ever be allocated a width greater than the natural width once all of the said widget’s siblings have received their natural widths. Furthermore, a widget will only ever be allocated a width greater than its natural width if it was configured to receive extra expand space from its parent container. |
||
This is similar to
|
||
Activates the |
||
Causes |
||
Signal emitted when a change of focus is requested |
||
Signal emitted if keyboard navigation fails. |
||
The GTK+ main loop will emit three signals for each GDK event delivered to a widget: one generic ::event signal, another, more specific, signal that matches the type of event delivered (e.g. "key-press-event") and finally a generic "event-after" signal. |
||
Signal will be emitted when a button (typically from a mouse) is pressed. |
||
Signal will be emitted when a button (typically from a mouse) is released. |
||
Signal emitted when a button in the 4 to 7 range is pressed. |
||
Signal emitted when the pointer moves over the widget’s GdkWindow. |
||
Signal emitted if a user requests that a toplevel window is closed. |
||
Signal is emitted when a GdkWindow is destroyed. |
||
Signal emitted when a key is pressed. |
||
Signal is emitted when a key is released. |
||
Signal event will be emitted when the pointer enters the widget’s window. |
||
Will be emitted when the pointer leaves the widget’s window. |
||
Signal will be emitted when the size, position or stacking of the widget’s window has changed. |
||
Signal emitted when the keyboard focus enters the widget’s window. |
||
Signal emitted when the keyboard focus leaves the widget’s window. |
||
Signal emitted when the widget’s window is mapped. |
||
Signal will be emitted when the widget’s window is unmapped. |
||
Signal will be emitted when a property on the widget’s window has been changed or deleted. |
||
Signal will be emitted when the the widget’s window has lost ownership of a selection. |
||
Signal will be emitted when another client requests ownership of the selection owned by the widget's window. |
||
Signal emitted when the widget’s window is obscured or unobscured. |
||
Signal emitted when the state of the toplevel window associated to the widget changes. |
||
Signal emitted when a redirected window belonging to widget gets drawn into. |
||
Signal emitted when a pointer or keyboard grab on a window belonging to widget gets broken. |
||
Signal emitted on the drag source when a drag is started. |
||
Signal emitted on the drag source when a drag is finished. |
||
Signal emitted on the drag source when the drop site requests the data which is dragged. |
||
Signal emitted on the drag source when a drag
with the action |
||
Signal emitted on the drop site when the cursor leaves the widget. |
||
signal emitted on the drop site when the user moves the cursor over the widget during a drag. |
||
Signal emitted on the drop site when the user drops the data onto the widget. |
||
Signal emitted on the drop site when the dragged data has been received. |
||
Signal emitted on the drag source when a drag has failed. |
||
Signal emitted whenever a widget should pop up a context menu. |
||
Returns the accessible object that describes the widget to an assistive technology. |
||
Signal emitted when the screen of a widget has changed. |
||
Signal allows applications and derived widgets to override the default GtkWidget handling for determining whether an accelerator can be activated. |
||
Signal emitted when the composited status of
widgets screen changes. See |
||
Signal emitted when “has-tooltip” is |
||
Computes whether a container should give this widget extra space when possible. |
||
Convert an initial size request from a widget's
GtkSizeRequestMode virtual method implementations into a size request to
be used by parent containers in laying out the widget.
adjust_size_request adjusts from a child widget's
original request to what a parent container should
use for layout. The |
||
Convert an initial size allocation assigned
by a GtkContainer using |
||
Signal emitted when the GtkStyleContext of a widget is changed. |
||
Invalidates the area of widget defined by
region by calling |
typedef struct { gint width; gint height; } GtkRequisition;
A GtkRequisition represents the desired size of a widget. See GtkWidget’s geometry management section for more information.
typedef GdkRectangle GtkAllocation;
A GtkAllocation of a widget represents region which has been allocated to the widget by its parent. It is a subregion of its parents allocation. See GtkWidget’s geometry management section for more information.
GtkStateType
has been deprecated since version 3.14 and should not be used in newly-written code.
All APIs that are using this enumeration have been deprecated in favor of alternatives using GtkStateFlags.
This type indicates the current state of a widget; the state determines how the widget is drawn. The GtkStateType enumeration is also used to identify different colors in a GtkStyle for drawing, so states can be used for subparts of a widget as well as entire widgets.
|
State during normal operation. |
||
|
State of a currently active widget, such as a depressed button. |
||
|
State indicating that the mouse pointer is over the widget and the widget will respond to mouse clicks. |
||
|
State of a selected item, such the selected row in a list. |
||
|
State indicating that the widget is unresponsive to user actions. |
||
|
The widget is inconsistent, such as checkbuttons
or radiobuttons that aren’t either set to |
||
|
The widget has the keyboard focus. |
Specifies a preference for height-for-width or width-for-height geometry management.
struct GtkRequestedSize { gpointer data; gint minimum_size; gint natural_size; };
Represents a request of a screen object in a given orientation. These
are primarily used in container implementations when allocating a natural
size for children calling. See gtk_distribute_natural_allocation()
.
Controls how a widget deals with extra space in a single (x or y) dimension.
Alignment only matters if the widget receives a “too large” allocation, for example if you packed the widget with the “expand” flag inside a GtkBox, then the widget might get extra space. If you have for example a 16x16 icon inside a 32x32 space, the icon could be scaled and stretched, it could be centered, or it could be positioned to one side of the space.
Note that in horizontal context GTK_ALIGN_START
and GTK_ALIGN_END
are interpreted relative to text direction.
GTK_ALIGN_BASELINE support for it is optional for containers and widgets, and
it is only supported for vertical alignment. When its not supported by
a child or a container it is treated as GTK_ALIGN_FILL
.
|
stretch to fill all space if possible, center if no meaningful way to stretch |
||
|
snap to left or top side, leaving space on right or bottom |
||
|
snap to right or bottom side, leaving space on left or top |
||
|
center natural width of widget inside the allocation |
||
|
align the widget according to the baseline. Since 3.10. |
“app-paintable”
property“app-paintable” gboolean
Whether the application will paint directly on the widget.
Flags: Read / Write
Default value: FALSE
“can-default”
property“can-default” gboolean
Whether the widget can be the default widget.
Flags: Read / Write
Default value: FALSE
“can-focus”
property“can-focus” gboolean
Whether the widget can accept the input focus.
Flags: Read / Write
Default value: FALSE
“composite-child”
property“composite-child” gboolean
Whether the widget is part of a composite widget.
Flags: Read
Default value: FALSE
“double-buffered”
property“double-buffered” gboolean
Whether the widget is double buffered.
GtkWidget:double-buffered
has been deprecated since version 3.14 and should not be used in newly-written code.
Widgets should not use this property.
Flags: Read / Write
Default value: TRUE
Since: 2.18
“events”
property“events” GdkEventMask
The event mask that decides what kind of GdkEvents this widget gets.
Flags: Read / Write
Default value: GDK_STRUCTURE_MASK
“expand”
property“expand” gboolean
Whether to expand in both directions. Setting this sets both “hexpand” and “vexpand”
Flags: Read / Write
Default value: FALSE
Since: 3.0
“focus-on-click”
property“focus-on-click” gboolean
Whether the widget should grab focus when it is clicked with the mouse.
This property is only relevant for widgets that can take focus.
Before 3.20, several widgets (GtkButton, GtkFileChooserButton, GtkComboBox) implemented this property individually.
Flags: Read / Write
Default value: TRUE
Since: 3.20
“halign”
property“halign” GtkAlign
How to distribute horizontal space if widget gets extra space, see GtkAlign
Flags: Read / Write
Default value: GTK_ALIGN_FILL
Since: 3.0
“has-default”
property“has-default” gboolean
Whether the widget is the default widget.
Flags: Read / Write
Default value: FALSE
“has-focus”
property“has-focus” gboolean
Whether the widget has the input focus.
Flags: Read / Write
Default value: FALSE
“has-tooltip”
property“has-tooltip” gboolean
Enables or disables the emission of “query-tooltip” on widget
.
A value of TRUE
indicates that widget
can have a tooltip, in this case
the widget will be queried using “query-tooltip” to determine
whether it will provide a tooltip or not.
Note that setting this property to TRUE
for the first time will change
the event masks of the GdkWindows of this widget to include leave-notify
and motion-notify events. This cannot and will not be undone when the
property is set to FALSE
again.
Flags: Read / Write
Default value: FALSE
Since: 2.12
“height-request”
property“height-request” gint
Override for height request of the widget, or -1 if natural request should be used.
Flags: Read / Write
Allowed values: >= -1
Default value: -1
“hexpand”
property“hexpand” gboolean
Whether to expand horizontally. See gtk_widget_set_hexpand()
.
Flags: Read / Write
Default value: FALSE
Since: 3.0
“hexpand-set”
property“hexpand-set” gboolean
Whether to use the “hexpand” property. See gtk_widget_get_hexpand_set()
.
Flags: Read / Write
Default value: FALSE
Since: 3.0
“is-focus”
property“is-focus” gboolean
Whether the widget is the focus widget within the toplevel.
Flags: Read / Write
Default value: FALSE
“margin”
property“margin” gint
Sets all four sides' margin at once. If read, returns max margin on any side.
Flags: Read / Write
Allowed values: [0,32767]
Default value: 0
Since: 3.0
“margin-bottom”
property“margin-bottom” gint
Margin on bottom side of widget.
This property adds margin outside of the widget's normal size
request, the margin will be added in addition to the size from
gtk_widget_set_size_request()
for example.
Flags: Read / Write
Allowed values: [0,32767]
Default value: 0
Since: 3.0
“margin-end”
property“margin-end” gint
Margin on end of widget, horizontally. This property supports left-to-right and right-to-left text directions.
This property adds margin outside of the widget's normal size
request, the margin will be added in addition to the size from
gtk_widget_set_size_request()
for example.
Flags: Read / Write
Allowed values: [0,32767]
Default value: 0
Since: 3.12
“margin-left”
property“margin-left” gint
Margin on left side of widget.
This property adds margin outside of the widget's normal size
request, the margin will be added in addition to the size from
gtk_widget_set_size_request()
for example.
GtkWidget:margin-left
has been deprecated since version 3.12 and should not be used in newly-written code.
Use “margin-start” instead.
Flags: Read / Write
Allowed values: [0,32767]
Default value: 0
Since: 3.0
“margin-right”
property“margin-right” gint
Margin on right side of widget.
This property adds margin outside of the widget's normal size
request, the margin will be added in addition to the size from
gtk_widget_set_size_request()
for example.
GtkWidget:margin-right
has been deprecated since version 3.12 and should not be used in newly-written code.
Use “margin-end” instead.
Flags: Read / Write
Allowed values: [0,32767]
Default value: 0
Since: 3.0
“margin-start”
property“margin-start” gint
Margin on start of widget, horizontally. This property supports left-to-right and right-to-left text directions.
This property adds margin outside of the widget's normal size
request, the margin will be added in addition to the size from
gtk_widget_set_size_request()
for example.
Flags: Read / Write
Allowed values: [0,32767]
Default value: 0
Since: 3.12
“margin-top”
property“margin-top” gint
Margin on top side of widget.
This property adds margin outside of the widget's normal size
request, the margin will be added in addition to the size from
gtk_widget_set_size_request()
for example.
Flags: Read / Write
Allowed values: [0,32767]
Default value: 0
Since: 3.0
“no-show-all”
property“no-show-all” gboolean
Whether gtk_widget_show_all() should not affect this widget.
Flags: Read / Write
Default value: FALSE
“opacity”
property“opacity” gdouble
The requested opacity of the widget. See gtk_widget_set_opacity()
for
more details about window opacity.
Before 3.8 this was only available in GtkWindow
Flags: Read / Write
Allowed values: [0,1]
Default value: 1
Since: 3.8
“parent”
property“parent” GtkContainer *
The parent widget of this widget. Must be a Container widget.
Flags: Read / Write
“receives-default”
property“receives-default” gboolean
If TRUE, the widget will receive the default action when it is focused.
Flags: Read / Write
Default value: FALSE
“scale-factor”
property“scale-factor” gint
The scale factor of the widget. See gtk_widget_get_scale_factor()
for
more details about widget scaling.
Flags: Read
Allowed values: >= 1
Default value: 1
Since: 3.10
“sensitive”
property“sensitive” gboolean
Whether the widget responds to input.
Flags: Read / Write
Default value: TRUE
“style”
property“style” GtkStyle *
The style of the widget, which contains information about how it will look (colors, etc).
GtkWidget:style
is deprecated and should not be used in newly-written code.
Use GtkStyleContext instead
Flags: Read / Write
“tooltip-markup”
property“tooltip-markup” gchar *
Sets the text of tooltip to be the given string, which is marked up
with the Pango text markup language.
Also see gtk_tooltip_set_markup()
.
This is a convenience property which will take care of getting the
tooltip shown if the given string is not NULL
: “has-tooltip”
will automatically be set to TRUE
and there will be taken care of
“query-tooltip” in the default signal handler.
Note that if both “tooltip-text” and “tooltip-markup” are set, the last one wins.
Flags: Read / Write
Default value: NULL
Since: 2.12
“tooltip-text”
property“tooltip-text” gchar *
Sets the text of tooltip to be the given string.
Also see gtk_tooltip_set_text()
.
This is a convenience property which will take care of getting the
tooltip shown if the given string is not NULL
: “has-tooltip”
will automatically be set to TRUE
and there will be taken care of
“query-tooltip” in the default signal handler.
Note that if both “tooltip-text” and “tooltip-markup” are set, the last one wins.
Flags: Read / Write
Default value: NULL
Since: 2.12
“valign”
property“valign” GtkAlign
How to distribute vertical space if widget gets extra space, see GtkAlign
Flags: Read / Write
Default value: GTK_ALIGN_FILL
Since: 3.0
“vexpand”
property“vexpand” gboolean
Whether to expand vertically. See gtk_widget_set_vexpand()
.
Flags: Read / Write
Default value: FALSE
Since: 3.0
“vexpand-set”
property“vexpand-set” gboolean
Whether to use the “vexpand” property. See gtk_widget_get_vexpand_set()
.
Flags: Read / Write
Default value: FALSE
Since: 3.0
“visible”
property“visible” gboolean
Whether the widget is visible.
Flags: Read / Write
Default value: FALSE
“width-request”
property“width-request” gint
Override for width request of the widget, or -1 if natural request should be used.
Flags: Read / Write
Allowed values: >= -1
Default value: -1
“cursor-aspect-ratio”
style property“cursor-aspect-ratio” gfloat
Aspect ratio with which to draw insertion cursor.
Flags: Read
Allowed values: [0,1]
Default value: 0.04
“cursor-color”
style property“cursor-color” GdkColor *
The color with which to draw the insertion cursor in entries and text views.
GtkWidget:cursor-color
has been deprecated since version 3.20 and should not be used in newly-written code.
Use the caret-color CSS property
Flags: Read
“focus-line-pattern”
style property“focus-line-pattern” gchar *
The "focus-line-pattern" style property defines the dash pattern used to draw the focus indicator. The character values are interpreted as pixel widths of alternating on and off segments of the line.
GtkWidget:focus-line-pattern
has been deprecated since version 3.14 and should not be used in newly-written code.
use the outline-style CSS property instead.
Flags: Read
Default value: "\001\001"
“focus-line-width”
style property“focus-line-width” gint
The "focus-line-width" style property defines the width, in pixels, of the focus indicator line
GtkWidget:focus-line-width
has been deprecated since version 3.14 and should not be used in newly-written code.
use the outline-width and padding CSS properties instead.
Flags: Read
Allowed values: >= 0
Default value: 1
“focus-padding”
style property“focus-padding” gint
The "focus-padding" style property defines the width, in pixels, between focus indicator and the widget 'box'.
GtkWidget:focus-padding
has been deprecated since version 3.14 and should not be used in newly-written code.
use the outline-offset CSS properties instead.
Flags: Read
Allowed values: >= 0
Default value: 1
“interior-focus”
style property“interior-focus” gboolean
The "interior-focus" style property defines whether to draw the focus indicator inside widgets.
GtkWidget:interior-focus
has been deprecated since version 3.14 and should not be used in newly-written code.
use the outline CSS properties instead.
Flags: Read
Default value: TRUE
“link-color”
style property“link-color” GdkColor *
The "link-color" style property defines the color of unvisited links.
GtkWidget:link-color
has been deprecated since version 3.12 and should not be used in newly-written code.
Links now use a separate state flags for selecting different theming, this style property is ignored
Flags: Read
Since: 2.10
“scroll-arrow-hlength”
style property“scroll-arrow-hlength” gint
The "scroll-arrow-hlength" style property defines the length of horizontal scroll arrows.
Flags: Read
Allowed values: >= 1
Default value: 16
Since: 2.10
“scroll-arrow-vlength”
style property“scroll-arrow-vlength” gint
The "scroll-arrow-vlength" style property defines the length of vertical scroll arrows.
Flags: Read
Allowed values: >= 1
Default value: 16
Since: 2.10
“secondary-cursor-color”
style property“secondary-cursor-color” GdkColor *
The color with which to draw the secondary insertion cursor in entries and text views when editing mixed right-to-left and left-to-right text.
GtkWidget:secondary-cursor-color
has been deprecated since version 3.20 and should not be used in newly-written code.
Use the -gtk-secondary-caret-color CSS property
Flags: Read
“separator-height”
style property“separator-height” gint
The "separator-height" style property defines the height of separators.
This property only takes effect if the "wide-separators" style property is TRUE
.
GtkWidget:separator-height
has been deprecated since version 3.20 and should not be used in newly-written code.
Use the standard min-height CSS property on the separator elements to size separators; the value of this style property is ignored.
Flags: Read
Allowed values: >= 0
Default value: 0
Since: 2.10
“separator-width”
style property“separator-width” gint
The "separator-width" style property defines the width of separators.
This property only takes effect if the "wide-separators" style property is TRUE
.
GtkWidget:separator-width
has been deprecated since version 3.20 and should not be used in newly-written code.
Use the standard min-width CSS property on the separator elements to size separators; the value of this style property is ignored.
Flags: Read
Allowed values: >= 0
Default value: 0
Since: 2.10
“text-handle-height”
style property“text-handle-height” gint
Height of text selection handles.
Flags: Read
Allowed values: >= 1
Default value: 20
“text-handle-width”
style property“text-handle-width” gint
Width of text selection handles.
Flags: Read
Allowed values: >= 1
Default value: 16
“visited-link-color”
style property“visited-link-color” GdkColor *
The "visited-link-color" style property defines the color of visited links.
GtkWidget:visited-link-color
has been deprecated since version 3.12 and should not be used in newly-written code.
Links now use a separate state flags for selecting different theming, this style property is ignored
Flags: Read
Since: 2.10
“wide-separators”
style property“wide-separators” gboolean
The "wide-separators" style property defines whether separators have configurable width and should be drawn using a box instead of a line.
GtkWidget:wide-separators
has been deprecated since version 3.20 and should not be used in newly-written code.
Use CSS properties on the separator elements to style separators; the value of this style property is ignored.
Flags: Read
Default value: FALSE
Since: 2.10
“window-dragging”
style property“window-dragging” gboolean
Whether windows can be dragged and maximized by clicking on empty areas.
Flags: Read
Default value: FALSE
“button-press-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::button-press-event signal will be emitted when a button (typically from a mouse) is pressed.
To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_BUTTON_PRESS_MASK mask.
This signal will be sent to the grab widget if there is one.
widget |
the object which received the signal. |
|
event |
the GdkEventButton which triggered this signal. |
[type Gdk.EventButton] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“button-release-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::button-release-event signal will be emitted when a button (typically from a mouse) is released.
To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_BUTTON_RELEASE_MASK mask.
This signal will be sent to the grab widget if there is one.
widget |
the object which received the signal. |
|
event |
the GdkEventButton which triggered this signal. |
[type Gdk.EventButton] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“can-activate-accel”
signalgboolean user_function (GtkWidget *widget, guint signal_id, gpointer user_data)
Determines whether an accelerator that activates the signal
identified by signal_id
can currently be activated.
This signal is present to allow applications and derived
widgets to override the default GtkWidget handling
for determining whether an accelerator can be activated.
widget |
the object which received the signal |
|
signal_id |
the ID of a signal installed on |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“child-notify”
signalvoid user_function (GtkWidget *widget, GParamSpec *child_property, gpointer user_data)
The ::child-notify signal is emitted for each child property that has changed on an object. The signal's detail holds the property name.
widget |
the object which received the signal |
|
child_property |
the GParamSpec of the changed child property |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“composited-changed”
signalvoid user_function (GtkWidget *widget, gpointer user_data)
The ::composited-changed signal is emitted when the composited
status of widgets
screen changes.
See gdk_screen_is_composited()
.
GtkWidget::composited-changed
has been deprecated since version 3.22 and should not be used in newly-written code.
Use GdkScreen::composited-changed instead.
widget |
the object on which the signal is emitted |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“configure-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::configure-event signal will be emitted when the size, position or
stacking of the widget
's window has changed.
To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.
widget |
the object which received the signal |
|
event |
the GdkEventConfigure which triggered this signal. |
[type Gdk.EventConfigure] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“damage-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
Emitted when a redirected window belonging to widget
gets drawn into.
The region/area members of the event shows what area of the redirected
drawable was drawn into.
widget |
the object which received the signal |
|
event |
the GdkEventExpose event. |
[type Gdk.EventExpose] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
Since: 2.14
“delete-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::delete-event signal is emitted if a user requests that
a toplevel window is closed. The default handler for this signal
destroys the window. Connecting gtk_widget_hide_on_delete()
to
this signal will cause the window to be hidden instead, so that
it can later be shown again without reconstructing it.
widget |
the object which received the signal |
|
event |
the event which triggered this signal |
|
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“destroy”
signalvoid user_function (GtkWidget *object, gpointer user_data)
Signals that all holders of a reference to the widget should release the reference that they hold. May result in finalization of the widget if all references are released.
This signal is not suitable for saving widget state.
object |
the object which received the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“destroy-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::destroy-event signal is emitted when a GdkWindow is destroyed.
To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.
widget |
the object which received the signal. |
|
event |
the event which triggered this signal |
|
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“direction-changed”
signalvoid user_function (GtkWidget *widget, GtkTextDirection previous_direction, gpointer user_data)
The ::direction-changed signal is emitted when the text direction of a widget changes.
widget |
the object on which the signal is emitted |
|
previous_direction |
the previous text direction of |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“drag-begin”
signalvoid user_function (GtkWidget *widget, GdkDragContext *context, gpointer user_data)
The ::drag-begin signal is emitted on the drag source when a drag is
started. A typical reason to connect to this signal is to set up a
custom drag icon with e.g. gtk_drag_source_set_icon_pixbuf()
.
Note that some widgets set up a drag icon in the default handler of
this signal, so you may have to use g_signal_connect_after()
to
override what the default handler did.
widget |
the object which received the signal |
|
context |
the drag context |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“drag-data-delete”
signalvoid user_function (GtkWidget *widget, GdkDragContext *context, gpointer user_data)
The ::drag-data-delete signal is emitted on the drag source when a drag
with the action GDK_ACTION_MOVE
is successfully completed. The signal
handler is responsible for deleting the data that has been dropped. What
"delete" means depends on the context of the drag operation.
widget |
the object which received the signal |
|
context |
the drag context |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“drag-data-get”
signalvoid user_function (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *data, guint info, guint time, gpointer user_data)
The ::drag-data-get signal is emitted on the drag source when the drop
site requests the data which is dragged. It is the responsibility of
the signal handler to fill data
with the data in the format which
is indicated by info
. See gtk_selection_data_set()
and
gtk_selection_data_set_text()
.
widget |
the object which received the signal |
|
context |
the drag context |
|
data |
the GtkSelectionData to be filled with the dragged data |
|
info |
the info that has been registered with the target in the GtkTargetList |
|
time |
the timestamp at which the data was requested |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“drag-data-received”
signalvoid user_function (GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data)
The ::drag-data-received signal is emitted on the drop site when the
dragged data has been received. If the data was received in order to
determine whether the drop will be accepted, the handler is expected
to call gdk_drag_status()
and not finish the drag.
If the data was received in response to a “drag-drop” signal
(and this is the last target to be received), the handler for this
signal is expected to process the received data and then call
gtk_drag_finish()
, setting the success
parameter depending on
whether the data was processed successfully.
Applications must create some means to determine why the signal was emitted
and therefore whether to call gdk_drag_status()
or gtk_drag_finish()
.
The handler may inspect the selected action with
gdk_drag_context_get_selected_action()
before calling
gtk_drag_finish()
, e.g. to implement GDK_ACTION_ASK
as
shown in the following example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
void drag_data_received (GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time) { if ((data->length >= 0) && (data->format == 8)) { GdkDragAction action; // handle data here action = gdk_drag_context_get_selected_action (context); if (action == GDK_ACTION_ASK) { GtkWidget *dialog; gint response; dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_YES_NO, "Move the data ?\n"); response = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); if (response == GTK_RESPONSE_YES) action = GDK_ACTION_MOVE; else action = GDK_ACTION_COPY; } gtk_drag_finish (context, TRUE, action == GDK_ACTION_MOVE, time); } else gtk_drag_finish (context, FALSE, FALSE, time); } |
widget |
the object which received the signal |
|
context |
the drag context |
|
x |
where the drop happened |
|
y |
where the drop happened |
|
data |
the received data |
|
info |
the info that has been registered with the target in the GtkTargetList |
|
time |
the timestamp at which the data was received |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“drag-drop”
signalgboolean user_function (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, gpointer user_data)
The ::drag-drop signal is emitted on the drop site when the user drops
the data onto the widget. The signal handler must determine whether
the cursor position is in a drop zone or not. If it is not in a drop
zone, it returns FALSE
and no further processing is necessary.
Otherwise, the handler returns TRUE
. In this case, the handler must
ensure that gtk_drag_finish()
is called to let the source know that
the drop is done. The call to gtk_drag_finish()
can be done either
directly or in a “drag-data-received” handler which gets
triggered by calling gtk_drag_get_data()
to receive the data for one
or more of the supported targets.
widget |
the object which received the signal |
|
context |
the drag context |
|
x |
the x coordinate of the current cursor position |
|
y |
the y coordinate of the current cursor position |
|
time |
the timestamp of the motion event |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“drag-end”
signalvoid user_function (GtkWidget *widget, GdkDragContext *context, gpointer user_data)
The ::drag-end signal is emitted on the drag source when a drag is finished. A typical reason to connect to this signal is to undo things done in “drag-begin”.
widget |
the object which received the signal |
|
context |
the drag context |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“drag-failed”
signalgboolean user_function (GtkWidget *widget, GdkDragContext *context, GtkDragResult result, gpointer user_data)
The ::drag-failed signal is emitted on the drag source when a drag has
failed. The signal handler may hook custom code to handle a failed DnD
operation based on the type of error, it returns TRUE
is the failure has
been already handled (not showing the default "drag operation failed"
animation), otherwise it returns FALSE
.
widget |
the object which received the signal |
|
context |
the drag context |
|
result |
the result of the drag operation |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 2.12
“drag-leave”
signalvoid user_function (GtkWidget *widget, GdkDragContext *context, guint time, gpointer user_data)
The ::drag-leave signal is emitted on the drop site when the cursor
leaves the widget. A typical reason to connect to this signal is to
undo things done in “drag-motion”, e.g. undo highlighting
with gtk_drag_unhighlight()
.
Likewise, the “drag-leave” signal is also emitted before the ::drag-drop signal, for instance to allow cleaning up of a preview item created in the “drag-motion” signal handler.
widget |
the object which received the signal. |
|
context |
the drag context |
|
time |
the timestamp of the motion event |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“drag-motion”
signalgboolean user_function (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, gpointer user_data)
The ::drag-motion signal is emitted on the drop site when the user
moves the cursor over the widget during a drag. The signal handler
must determine whether the cursor position is in a drop zone or not.
If it is not in a drop zone, it returns FALSE
and no further processing
is necessary. Otherwise, the handler returns TRUE
. In this case, the
handler is responsible for providing the necessary information for
displaying feedback to the user, by calling gdk_drag_status()
.
If the decision whether the drop will be accepted or rejected can't be
made based solely on the cursor position and the type of the data, the
handler may inspect the dragged data by calling gtk_drag_get_data()
and
defer the gdk_drag_status()
call to the “drag-data-received”
handler. Note that you must pass GTK_DEST_DEFAULT_DROP,
GTK_DEST_DEFAULT_MOTION or GTK_DEST_DEFAULT_ALL to gtk_drag_dest_set()
when using the drag-motion signal that way.
Also note that there is no drag-enter signal. The drag receiver has to
keep track of whether he has received any drag-motion signals since the
last “drag-leave” and if not, treat the drag-motion signal as
an "enter" signal. Upon an "enter", the handler will typically highlight
the drop site with gtk_drag_highlight()
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
static void drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time) { GdkAtom target; PrivateData *private_data = GET_PRIVATE_DATA (widget); if (!private_data->drag_highlight) { private_data->drag_highlight = 1; gtk_drag_highlight (widget); } target = gtk_drag_dest_find_target (widget, context, NULL); if (target == GDK_NONE) gdk_drag_status (context, 0, time); else { private_data->pending_status = gdk_drag_context_get_suggested_action (context); gtk_drag_get_data (widget, context, target, time); } return TRUE; } static void drag_data_received (GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint time) { PrivateData *private_data = GET_PRIVATE_DATA (widget); if (private_data->suggested_action) { private_data->suggested_action = 0; // We are getting this data due to a request in drag_motion, // rather than due to a request in drag_drop, so we are just // supposed to call gdk_drag_status(), not actually paste in // the data. str = gtk_selection_data_get_text (selection_data); if (!data_is_acceptable (str)) gdk_drag_status (context, 0, time); else gdk_drag_status (context, private_data->suggested_action, time); } else { // accept the drop } } |
widget |
the object which received the signal |
|
context |
the drag context |
|
x |
the x coordinate of the current cursor position |
|
y |
the y coordinate of the current cursor position |
|
time |
the timestamp of the motion event |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“draw”
signalgboolean user_function (GtkWidget *widget, CairoContext *cr, gpointer user_data)
This signal is emitted when a widget is supposed to render itself.
The widget
's top left corner must be painted at the origin of
the passed in context and be sized to the values returned by
gtk_widget_get_allocated_width()
and
gtk_widget_get_allocated_height()
.
Signal handlers connected to this signal can modify the cairo
context passed as cr
in any way they like and don't need to
restore it. The signal emission takes care of calling cairo_save()
before and cairo_restore()
after invoking the handler.
The signal handler will get a cr
with a clip region already set to the
widget's dirty region, i.e. to the area that needs repainting. Complicated
widgets that want to avoid redrawing themselves completely can get the full
extents of the clip region with gdk_cairo_get_clip_rectangle()
, or they can
get a finer-grained representation of the dirty region with
cairo_copy_clip_rectangle_list()
.
widget |
the object which received the signal |
|
cr |
the cairo context to draw to |
|
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
Since: 3.0
“enter-notify-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::enter-notify-event will be emitted when the pointer enters
the widget
's window.
To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_ENTER_NOTIFY_MASK mask.
This signal will be sent to the grab widget if there is one.
widget |
the object which received the signal |
|
event |
the GdkEventCrossing which triggered this signal. |
[type Gdk.EventCrossing] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The GTK+ main loop will emit three signals for each GDK event delivered to a widget: one generic ::event signal, another, more specific, signal that matches the type of event delivered (e.g. “key-press-event”) and finally a generic “event-after” signal.
widget |
the object which received the signal. |
|
event |
the GdkEvent which triggered this signal |
|
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event
and to cancel the emission of the second specific ::event signal.
FALSE
to propagate the event further and to allow the emission of
the second signal. The ::event-after signal is emitted regardless of
the return value.
Flags: Run Last
“event-after”
signalvoid user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
After the emission of the “event” signal and (optionally) the second more specific signal, ::event-after will be emitted regardless of the previous two signals handlers return values.
widget |
the object which received the signal. |
|
event |
the GdkEvent which triggered this signal |
|
user_data |
user data set when the signal handler was connected. |
“focus”
signalgboolean user_function (GtkWidget *widget, GtkDirectionType direction, gpointer user_data)
widget |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event. FALSE
to propagate the event further.
Flags: Run Last
“focus-in-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::focus-in-event signal will be emitted when the keyboard focus
enters the widget
's window.
To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_FOCUS_CHANGE_MASK mask.
widget |
the object which received the signal |
|
event |
the GdkEventFocus which triggered this signal. |
[type Gdk.EventFocus] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“focus-out-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::focus-out-event signal will be emitted when the keyboard focus
leaves the widget
's window.
To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_FOCUS_CHANGE_MASK mask.
widget |
the object which received the signal |
|
event |
the GdkEventFocus which triggered this signal. |
[type Gdk.EventFocus] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.

On X11, this happens when the grab window becomes unviewable (i.e. it or one of its ancestors is unmapped), or if the same application grabs the pointer or keyboard again.
widget |
the object which received the signal |
|
event |
the GdkEventGrabBroken event. |
[type Gdk.EventGrabBroken] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for
the event. FALSE
to propagate the event further.
Flags: Run Last
Since: 2.8
“grab-focus”
signalvoid user_function (GtkWidget *widget, gpointer user_data)
widget |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“grab-notify”
signalvoid user_function (GtkWidget *widget, gboolean was_grabbed, gpointer user_data)
The ::grab-notify signal is emitted when a widget becomes shadowed by a GTK+ grab (not a pointer or keyboard grab) on another widget, or when it becomes unshadowed due to a grab being removed.
A widget is shadowed by a gtk_grab_add()
when the topmost
grab widget in the grab stack of its window group is not
its ancestor.
Flags: Run First
“hide”
signalvoid user_function (GtkWidget *widget, gpointer user_data)
The ::hide signal is emitted when widget
is hidden, for example with
gtk_widget_hide()
.
widget |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“hierarchy-changed”
signalvoid user_function (GtkWidget *widget, GtkWidget *previous_toplevel, gpointer user_data)
The ::hierarchy-changed signal is emitted when the anchored state of a widget changes. A widget is “anchored” when its toplevel ancestor is a GtkWindow. This signal is emitted when a widget changes from un-anchored to anchored or vice-versa.
widget |
the object on which the signal is emitted |
|
previous_toplevel |
the previous toplevel ancestor, or |
[allow-none] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“key-press-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::key-press-event signal is emitted when a key is pressed. The signal emission will reoccur at the key-repeat rate when the key is kept pressed.
To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_KEY_PRESS_MASK mask.
This signal will be sent to the grab widget if there is one.
widget |
the object which received the signal |
|
event |
the GdkEventKey which triggered this signal. |
[type Gdk.EventKey] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“key-release-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::key-release-event signal is emitted when a key is released.
To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_KEY_RELEASE_MASK mask.
This signal will be sent to the grab widget if there is one.
widget |
the object which received the signal |
|
event |
the GdkEventKey which triggered this signal. |
[type Gdk.EventKey] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“keynav-failed”
signalgboolean user_function (GtkWidget *widget, GtkDirectionType direction, gpointer user_data)
Gets emitted if keyboard navigation fails.
See gtk_widget_keynav_failed()
for details.
widget |
the object which received the signal |
|
direction |
the direction of movement |
|
user_data |
user data set when the signal handler was connected. |
TRUE
if stopping keyboard navigation is fine, FALSE
if the emitting widget should try to handle the keyboard
navigation attempt in its parent container(s).
Flags: Run Last
Since: 2.12
“leave-notify-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::leave-notify-event will be emitted when the pointer leaves
the widget
's window.
To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_LEAVE_NOTIFY_MASK mask.
This signal will be sent to the grab widget if there is one.
widget |
the object which received the signal |
|
event |
the GdkEventCrossing which triggered this signal. |
[type Gdk.EventCrossing] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“map”
signalvoid user_function (GtkWidget *widget, gpointer user_data)
The ::map signal is emitted when widget
is going to be mapped, that is
when the widget is visible (which is controlled with
gtk_widget_set_visible()
) and all its parents up to the toplevel widget
are also visible. Once the map has occurred, “map-event” will
be emitted.
The ::map signal can be used to determine whether a widget will be drawn, for instance it can resume an animation that was stopped during the emission of “unmap”.
widget |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“map-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::map-event signal will be emitted when the widget
's window is
mapped. A window is mapped when it becomes visible on the screen.
To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.
widget |
the object which received the signal |
|
event |
the GdkEventAny which triggered this signal. |
[type Gdk.EventAny] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“mnemonic-activate”
signalgboolean user_function (GtkWidget *widget, gboolean group_cycling, gpointer user_data)
The default handler for this signal activates widget
if group_cycling
is FALSE
, or just makes widget
grab focus if group_cycling
is TRUE
.
widget |
the object which received the signal. |
|
group_cycling |
|
|
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“motion-notify-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::motion-notify-event signal is emitted when the pointer moves over the widget's GdkWindow.
To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_POINTER_MOTION_MASK mask.
This signal will be sent to the grab widget if there is one.
widget |
the object which received the signal. |
|
event |
the GdkEventMotion which triggered this signal. |
[type Gdk.EventMotion] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“move-focus”
signalvoid user_function (GtkWidget *widget, GtkDirectionType direction, gpointer user_data)
widget |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“parent-set”
signalvoid user_function (GtkWidget *widget, GtkWidget *old_parent, gpointer user_data)
The ::parent-set signal is emitted when a new parent has been set on a widget.
widget |
the object on which the signal is emitted |
|
old_parent |
the previous parent, or |
[allow-none] |
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“popup-menu”
signalgboolean user_function (GtkWidget *widget, gpointer user_data)
This signal gets emitted whenever a widget should pop up a context menu. This usually happens through the standard key binding mechanism; by pressing a certain key while a widget is focused, the user can cause the widget to pop up a menu. For example, the GtkEntry widget creates a menu with clipboard commands. See the Popup Menu Migration Checklist for an example of how to use this signal.
widget |
the object which received the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“property-notify-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::property-notify-event signal will be emitted when a property on
the widget
's window has been changed or deleted.
To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_PROPERTY_CHANGE_MASK mask.
widget |
the object which received the signal |
|
event |
the GdkEventProperty which triggered this signal. |
[type Gdk.EventProperty] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“proximity-in-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
To receive this signal the GdkWindow associated to the widget needs to enable the GDK_PROXIMITY_IN_MASK mask.
This signal will be sent to the grab widget if there is one.
widget |
the object which received the signal |
|
event |
the GdkEventProximity which triggered this signal. |
[type Gdk.EventProximity] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“proximity-out-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
To receive this signal the GdkWindow associated to the widget needs to enable the GDK_PROXIMITY_OUT_MASK mask.
This signal will be sent to the grab widget if there is one.
widget |
the object which received the signal |
|
event |
the GdkEventProximity which triggered this signal. |
[type Gdk.EventProximity] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“query-tooltip”
signalgboolean user_function (GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip, gpointer user_data)
Emitted when “has-tooltip” is TRUE
and the hover timeout
has expired with the cursor hovering "above" widget
; or emitted when widget
got
focus in keyboard mode.
Using the given coordinates, the signal handler should determine
whether a tooltip should be shown for widget
. If this is the case
TRUE
should be returned, FALSE
otherwise. Note that if
keyboard_mode
is TRUE
, the values of x
and y
are undefined and
should not be used.
The signal handler is free to manipulate tooltip
with the therefore
destined function calls.
widget |
the object which received the signal |
|
x |
the x coordinate of the cursor position where the request has
been emitted, relative to |
|
y |
the y coordinate of the cursor position where the request has
been emitted, relative to |
|
keyboard_mode |
|
|
tooltip |
||
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 2.12
“realize”
signalvoid user_function (GtkWidget *widget, gpointer user_data)
The ::realize signal is emitted when widget
is associated with a
GdkWindow, which means that gtk_widget_realize()
has been called or the
widget has been mapped (that is, it is going to be drawn).
widget |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“screen-changed”
signalvoid user_function (GtkWidget *widget, GdkScreen *previous_screen, gpointer user_data)
The ::screen-changed signal gets emitted when the screen of a widget has changed.
widget |
the object on which the signal is emitted |
|
previous_screen |
the previous screen, or |
[allow-none] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“scroll-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::scroll-event signal is emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned.
To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_SCROLL_MASK mask.
This signal will be sent to the grab widget if there is one.
widget |
the object which received the signal. |
|
event |
the GdkEventScroll which triggered this signal. |
[type Gdk.EventScroll] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“selection-clear-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::selection-clear-event signal will be emitted when the
the widget
's window has lost ownership of a selection.
widget |
the object which received the signal |
|
event |
the GdkEventSelection which triggered this signal. |
[type Gdk.EventSelection] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“selection-get”
signalvoid user_function (GtkWidget *widget, GtkSelectionData *data, guint info, guint time, gpointer user_data)
widget |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“selection-notify-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
widget |
the object which received the signal. |
|
event |
. |
[type Gdk.EventSelection] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event. FALSE
to propagate the event further.
Flags: Run Last
“selection-received”
signalvoid user_function (GtkWidget *widget, GtkSelectionData *data, guint time, gpointer user_data)
widget |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“selection-request-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::selection-request-event signal will be emitted when
another client requests ownership of the selection owned by
the widget
's window.
widget |
the object which received the signal |
|
event |
the GdkEventSelection which triggered this signal. |
[type Gdk.EventSelection] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“show”
signalvoid user_function (GtkWidget *widget, gpointer user_data)
The ::show signal is emitted when widget
is shown, for example with
gtk_widget_show()
.
widget |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“show-help”
signalgboolean user_function (GtkWidget *widget, GtkWidgetHelpType help_type, gpointer user_data)
widget |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Action
“size-allocate”
signalvoid user_function (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data)
widget |
the object which received the signal. |
|
allocation |
the region which has been allocated to the widget. |
[type Gtk.Allocation] |
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“state-changed”
signalvoid user_function (GtkWidget *widget, GtkStateType state, gpointer user_data)
The ::state-changed signal is emitted when the widget state changes.
See gtk_widget_get_state()
.
GtkWidget::state-changed
has been deprecated since version 3.0 and should not be used in newly-written code.
Use “state-flags-changed” instead.
widget |
the object which received the signal. |
|
state |
the previous state |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“state-flags-changed”
signalvoid user_function (GtkWidget *widget, GtkStateFlags flags, gpointer user_data)
The ::state-flags-changed signal is emitted when the widget state
changes, see gtk_widget_get_state_flags()
.
widget |
the object which received the signal. |
|
flags |
The previous state flags. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
Since: 3.0
“style-set”
signalvoid user_function (GtkWidget *widget, GtkStyle *previous_style, gpointer user_data)
The ::style-set signal is emitted when a new style has been set
on a widget. Note that style-modifying functions like
gtk_widget_modify_base()
also cause this signal to be emitted.
Note that this signal is emitted for changes to the deprecated GtkStyle. To track changes to the GtkStyleContext associated with a widget, use the “style-updated” signal.
GtkWidget::style-set
has been deprecated since version 3.0 and should not be used in newly-written code.
Use the “style-updated” signal
widget |
the object on which the signal is emitted |
|
previous_style |
the previous style, or |
[allow-none] |
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“style-updated”
signalvoid user_function (GtkWidget *widget, gpointer user_data)
The ::style-updated signal is a convenience signal that is emitted when the
“changed” signal is emitted on the widget
's associated
GtkStyleContext as returned by gtk_widget_get_style_context()
.
Note that style-modifying functions like gtk_widget_override_color()
also
cause this signal to be emitted.
widget |
the object on which the signal is emitted |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
Since: 3.0
“touch-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *arg1, gpointer user_data)
Flags: Run Last
“unmap”
signalvoid user_function (GtkWidget *widget, gpointer user_data)
The ::unmap signal is emitted when widget
is going to be unmapped, which
means that either it or any of its parents up to the toplevel widget have
been set as hidden.
As ::unmap indicates that a widget will not be shown any longer, it can be used to, for example, stop an animation on the widget.
widget |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“unmap-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::unmap-event signal will be emitted when the widget
's window is
unmapped. A window is unmapped when it becomes invisible on the screen.
To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.
widget |
the object which received the signal |
|
event |
the GdkEventAny which triggered this signal. |
[type Gdk.EventAny] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“unrealize”
signalvoid user_function (GtkWidget *widget, gpointer user_data)
The ::unrealize signal is emitted when the GdkWindow associated with
widget
is destroyed, which means that gtk_widget_unrealize()
has been
called or the widget has been unmapped (that is, it is going to be
hidden).
widget |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“visibility-notify-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::visibility-notify-event will be emitted when the widget
's
window is obscured or unobscured.
To receive this signal the GdkWindow associated to the widget needs to enable the GDK_VISIBILITY_NOTIFY_MASK mask.
GtkWidget::visibility-notify-event
has been deprecated since version 3.12 and should not be used in newly-written code.
Modern composited windowing systems with pervasive transparency make it impossible to track the visibility of a window reliably, so this signal can not be guaranteed to provide useful information.
widget |
the object which received the signal |
|
event |
the GdkEventVisibility which triggered this signal. |
[type Gdk.EventVisibility] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the event.
FALSE
to propagate the event further.
Flags: Run Last
“window-state-event”
signalgboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data)
The ::window-state-event will be emitted when the state of the
toplevel window associated to the widget
changes.
To receive this signal the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.
widget |
the object which received the signal |
|
event |
the GdkEventWindowState which triggered this signal. |
[type Gdk.EventWindowState] |
user_data |
user data set when the signal handler was connected. |
TRUE
to stop other handlers from being invoked for the
event. FALSE
to propagate the event further.
Flags: Run Last


| 1 | /* | |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one | |
| 3 | * or more contributor license agreements. See the NOTICE file | |
| 4 | * distributed with this work for additional information | |
| 5 | * regarding copyright ownership. The ASF licenses this file | |
| 6 | * to you under the Apache License, Version 2.0 (the | |
| 7 | * "License"); you may not use this file except in compliance | |
| 8 | * with the License. You may obtain a copy of the License at | |
| 9 | * | |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 11 | * | |
| 12 | * Unless required by applicable law or agreed to in writing, | |
| 13 | * software distributed under the License is distributed on an | |
| 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| 15 | * KIND, either express or implied. See the License for the | |
| 16 | * specific language governing permissions and limitations | |
| 17 | * under the License. | |
| 18 | */ | |
| 19 | package org.apache.myfaces.shared.webapp.webxml; | |
| 20 | ||
| 21 | public class ServletMapping | |
| 22 | { | |
| 23 | private final String _servletName; | |
| 24 | private final Class _servletClass; | |
| 25 | private final String _urlPattern; | |
| 26 | private final String _extension; | |
| 27 | private final String _prefix; | |
| 28 | ||
| 29 | public ServletMapping(String servletName, Class servletClass, String urlPattern) | |
| 30 | { | |
| 31 | _servletName = servletName; | |
| 32 | _servletClass = servletClass; | |
| 33 | _urlPattern = urlPattern; | |
| 34 |
2
1. <init> : negated conditional → KILLED 2. <init> : negated conditional → KILLED |
_extension = _urlPattern != null && _urlPattern.startsWith("*.") ? _urlPattern.substring(_urlPattern |
| 35 | .indexOf('.')) : null; | |
| 36 |
1
1. <init> : negated conditional → KILLED |
if (_extension == null) |
| 37 | { | |
| 38 | int index = _urlPattern.indexOf("/*"); | |
| 39 |
1
1. <init> : negated conditional → KILLED |
if (index != -1) |
| 40 | { | |
| 41 | _prefix = _urlPattern.substring(0, _urlPattern.indexOf("/*")); | |
| 42 | } | |
| 43 | else | |
| 44 | { | |
| 45 | _prefix = _urlPattern; | |
| 46 | } | |
| 47 | } | |
| 48 | else | |
| 49 | { | |
| 50 | _prefix = null; | |
| 51 | } | |
| 52 | } | |
| 53 | ||
| 54 | public boolean isExtensionMapping() | |
| 55 | { | |
| 56 |
2
1. isExtensionMapping : replaced boolean return with true for org/apache/myfaces/shared/webapp/webxml/ServletMapping::isExtensionMapping → KILLED 2. isExtensionMapping : negated conditional → KILLED |
return _extension != null; |
| 57 | } | |
| 58 | ||
| 59 | public String getExtension() | |
| 60 | { | |
| 61 |
1
1. getExtension : replaced return value with "" for org/apache/myfaces/shared/webapp/webxml/ServletMapping::getExtension → KILLED |
return _extension; |
| 62 | } | |
| 63 | ||
| 64 | public String getPrefix() | |
| 65 | { | |
| 66 |
1
1. getPrefix : replaced return value with "" for org/apache/myfaces/shared/webapp/webxml/ServletMapping::getPrefix → KILLED |
return _prefix; |
| 67 | } | |
| 68 | ||
| 69 | public String getServletName() | |
| 70 | { | |
| 71 |
1
1. getServletName : replaced return value with "" for org/apache/myfaces/shared/webapp/webxml/ServletMapping::getServletName → NO_COVERAGE |
return _servletName; |
| 72 | } | |
| 73 | ||
| 74 | public Class getServletClass() | |
| 75 | { | |
| 76 |
1
1. getServletClass : replaced return value with null for org/apache/myfaces/shared/webapp/webxml/ServletMapping::getServletClass → NO_COVERAGE |
return _servletClass; |
| 77 | } | |
| 78 | ||
| 79 | public String getUrlPattern() | |
| 80 | { | |
| 81 |
1
1. getUrlPattern : replaced return value with "" for org/apache/myfaces/shared/webapp/webxml/ServletMapping::getUrlPattern → KILLED |
return _urlPattern; |
| 82 | } | |
| 83 | } | |
Mutations | ||
| 34 |
1.1 2.2 |
|
| 36 |
1.1 |
|
| 39 |
1.1 |
|
| 56 |
1.1 2.2 |
|
| 61 |
1.1 |
|
| 66 |
1.1 |
|
| 71 |
1.1 |
|
| 76 |
1.1 |
|
| 81 |
1.1 |


public interface ResourceStoringManagement
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachmentStoringPreProcessor(AttachmentStoringPreProcessor processor)
Method to add a new processor to the list of processors.
|
void |
assertReadAccess(Long attachmentId)
Assert that the current user has read access to the attachment
|
void |
assertWriteAccess(Long attachmentId)
Assert that the current user has access to edit the attachment
|
void |
deleteAttachment(Long attachmentId)
Deletes an attachment.
|
void |
deleteOrphanedAttachments(Collection<Long> attachmentIds)
Deletes all provided attachments that are not connected to a note.
|
int |
deleteOrphanedAttachments(Date upperUploadDate)
Remove all attachments which are not connected to a note and which are older than the given
date.
|
AttachmentTO |
getAttachment(ContentId contentId)
Returns an attachment with the delivered content id.
|
AttachmentTO |
getAttachment(Long attachmentId)
Get an attachment by the given ID.
|
<T> Collection<T> |
getAttachmentsOfNote(Long noteId,
Collection<Long> attachmentIdsToFilter,
Converter<Attachment,T> converter)
Return the attachments of a note converted with the help of the provided converter
|
Long |
getNoteOfAttachment(ContentId contentId)
Get the note the given attachment is assigned to.
|
Long |
getNoteOfAttachment(Long attachmentId)
Get the note the given attachment is assigned to.
|
void |
migrateContentTypeEmptyAttachments()
Migrate the attachments with an empty content type
|
void |
removeAttachmentStoringPreProcessor(AttachmentStoringPreProcessor processor)
Method to remove a new processor from the list of registered processors.
|
Attachment |
storeAttachment(AttachmentTO attachment)
Store the attachment in the repository and return the created entity.
|
Attachment |
storeCopyOfAttachment(Attachment contentResource)
Create a copy of a stored attachment.
|
void addAttachmentStoringPreProcessor(AttachmentStoringPreProcessor processor)
processor
- The processor.void assertReadAccess(Long attachmentId) throws AuthorizationException, AttachmentNotFoundException
attachmentId
- the ID of the attachmentAuthorizationException
- in case the user has no read accessAttachmentNotFoundException
- in case the attachment does not existvoid assertWriteAccess(Long attachmentId) throws AuthorizationException, AttachmentNotFoundException
attachmentId
- the ID of the attachmentAuthorizationException
- in case the user has no read accessAttachmentNotFoundException
- in case the attachment does not existvoid deleteAttachment(Long attachmentId) throws AttachmentStillAssignedException, AuthorizationException
attachmentId
- the ID of attachment to deleteAttachmentStillAssignedException
- in case the attachment cannot be deleted because it is still assigned to the noteAuthorizationException
- Thrown, when the current user is not allowed to remove the given attachment.int deleteOrphanedAttachments(Date upperUploadDate) throws AuthorizationException
upperUploadDate
- Attachments must be older than this date.AuthorizationException
- in case the current user is not the internal system uservoid deleteOrphanedAttachments(Collection<Long> attachmentIds) throws AuthorizationException
attachmentIds
- the IDs of the attachments to deleteAuthorizationException
AttachmentTO getAttachment(ContentId contentId) throws ContentRepositoryException, AuthorizationException
Returns an attachment with the delivered content id. This method checks if the current user has read access to the note the attachment belongs to.
AttachmentTO getAttachment(Long attachmentId) throws ContentRepositoryException, AuthorizationException, AttachmentNotFoundException
attachmentId
- the ID of the attachmentAuthorizationException
- in case the current user has no access to the attachment. This is the case if the
attachment was not yet published and the current user is not the uploader or the
attachment is published and the current user has no access to the note of the
attachment.AttachmentNotFoundException
- in case the attachment does not existContentRepositoryException
- in case the attachment data cannot be read from the content repository were it is
stored<T> Collection<T> getAttachmentsOfNote(Long noteId, Collection<Long> attachmentIdsToFilter, Converter<Attachment,T> converter) throws AuthorizationException, NotFoundException
T
- The target type of the conversionnoteId
- the ID of the noteattachmentIdsToFilter
- optional collection of attachment IDs to filter the result by only adding those
attachments whose ID is in the collection. If omitted all attachments will be
considered.converter
- the converter to convert the found attachmentsNotFoundException
- in case the note does not existAuthorizationException
- in case the current user has no read access to the noteLong getNoteOfAttachment(ContentId contentId) throws AuthorizationException
contentId
- the content ID of the attachmentAuthorizationException
- in case the current user has no access to the noteLong getNoteOfAttachment(Long attachmentId) throws AuthorizationException
attachmentId
- the ID of the attachmentAuthorizationException
- in case the current user has no access to the notevoid migrateContentTypeEmptyAttachments()
Migrate the attachments with an empty content type
void removeAttachmentStoringPreProcessor(AttachmentStoringPreProcessor processor)
processor
- The processor.Attachment storeAttachment(AttachmentTO attachment) throws AuthorizationException
attachment
- TO containing the details of the attachment to store.AuthorizationException
- in case the current user is not the internal system or an authenticated Communote
userAttachment storeCopyOfAttachment(Attachment contentResource) throws AuthorizationException
AuthorizationException
- in case the current user is not the internal system or an authenticated Communote
userCopyright © 2019 Communote team. All rights reserved.


Moose\Migration\ToVersion2::change
Change Method.
Write your reversible migrations using this method. More information on writing migrations is available here: http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class The following commands can be used in this method and Phinx will automatically reverse them when rolling back: createTable renameTable addColumn renameColumn addIndex addForeignKey Remember to call "create()" or "update()" and NOT "save()" when working with the Table class.
Signature
public function change()


| Design and Implementation of a validating XML parser in Haskell: Master's thesis; University of Applied Sciences Wedel | ||
|---|---|---|
| Prev | Chapter 4. Package hvalidator | Next |
Validation of the DTD is done by the module DTDValidation. Notations, unparsed entities, element declarations and attribute declarations are checked if they correspond to the constraints of the XML 1.0 specification [WWW01].
The following checks are performed:
DTD
Error: There exists no DOCTYPE declaration in the document.
Notations
Error: A notation was already specified.
Unparsed entities:
Warning: Entity is declared multiple times. First declaration is used.
Error: A referenced notations must be declared
Element declarations:
Error: Element is declared more than once
Error: Element was specified multiple times in a content model of type mixed content.
Warning: Element used in a content model is not declared.
Attribute declarations:
Warning: There exists no element declaration for the attribute declaration.
Warning: Attribute is declared multiple times. First declaration will be used.
Warning: Same Nmtoken should not occur more than once in enumerate attribute types.
Error: Element already has an attribute of type ID. A second attribute of type ID is not permitted.
Error: ID attribute must have a declared default of #IMPLIED or #REQUIRED.
Error: Element already has an attribute of type NOTATION. A second attribute of type NOTATION is not permitted.
Error: Attribute of type NOTATION must not be declared on an element declared EMPTY.
Error: A notation must be declared when referenced in the notation type list for an attribute.
Error: The declared default value must meet the lexical constraints of the declared attribute type.
Each check is done by a separate function, which takes the child list of the XDTD DOCTYPE node as input and returns a list of errors. Some functions can optionally take some further arguments to have access to context information, e.g. when validating unparsed entities, a list of all defined notations is needed. The result of validating the DTD is a concatenated list of the results of all validation functions.
The following example shows a filter function for checking the validity constraint: "No Notation on Empty Element" (section 3.3.1 in XML 1.0 specification [WWW01]). It means that an attribute of type NOTATION must not be declared for an element declared EMPTY. A notation attribute is a way to give an application a clue how the content of an element should be processed. The notation might refer to a program that can process the content, e.g. a base-64 encoded JPEG. Because empty elements cannot have contents, attributes of type notation are forbidden. The function checkNoNotationForEmptyElement is initialized with a list of all element names declared EMPTY. The constructed filter is then applied to all XDTD ATTLIST nodes of type NOTATION that have been selected from the DTD by another filter function.
Example 4-2. Validation that notations are not declared for EMPTY elements
checkNoNotationForEmptyElement :: [String] -> XmlFilter checkNoNotationForEmptyElement emptyElems nd@(NTree (XDTD ATTLIST al) _) = if elemName `elem` emptyElems then err ("Attribute \""++ attName ++"\" of type NOTATION must not be "++ "declared on the element \""++ elemName ++"\" declared EMPTY.") nd else [] where elemName = getAttrValue1 a_name al attName = getAttrValue1 a_value al checkNoNotationForEmptyElement _ nd = error ("checkNoNotationForEmptyElement: illegal parameter:\n" ++ show nd) |
The validation functions cannot check if a content model is deterministic. This requirement is for compatibility with SGML, because some SGML tools can rely on unambiguous content models. XML processors may flag such content models as errors, but the Haskell XML Toolbox does not. It does not need deterministic content models for checking if the children of an element are valid (see Section 4.7).


--- post_id: /notes-on-networks date: 2007-08-01 11:50 return_url: '2007-07-31-notes-on-networks.html' name: 'monki' email<EMAIL_ADDRESS>comment: '
Despite networks being distributed systems and there often being several paths between two given nodes, there are always gigantic hubs that''s hard to ignore if you want to keep the flow of information on an acceptable high level of bandwidth.
' ---


--- layout: index title: Open Shop Channel ---
We hand-pick the homebrew that goes into our repository.
You can use your Wii to download homebrew, so you don't have to constantly put your SD Card in your computer to add homebrew.
The Open Shop Channel (our server for the Homebrew Browser) has homebrew that the HBB never had.
The Open Shop Channel is hosted and supported by members of RiiConnect24.
WiiDatabase is an excellent German site for up-to-date homebrew for Nintendo products. We have used some Wii homebrew that WiiDatabase hosts.


lue lisää
This div is just here to enable scrolling. Tip: Try to remove the background-attachment property to remove the scrolling effect.


Christian Horner claims translations issues with Verstappen’s ‘cheating’ comments
by Bevan YoulRed Bull team principal Christian Horner has said that Max Verstappen’s comments on Ferrari cheating with their engine are “played with a little” between translations from different languages.
At the United States Grand Prix Lewis Hamilton claimed his sixth World Championship while Mercedes teammate Valtteri Bottas took the win, but the lack of pace from Ferrari was surprising.
Verstappen comments after the race were that Ferrari had been cheating with their power unit and the reason they weren’t as fast was due to the FIA’s release of technical directives changing their system.
Sebastian Vettel recently said the Dutchman’s comment were “immature” but Horner believes there was some manipulation from the media.
“I think Max’s comments were taken…perhaps…by the time you had translated from Dutch to German to English sometimes [the quotes] they get played with a little,” Horner told Sky Sports F1.
“Being such a competitive business and complicated business, teams are continually asking questions of the technical delegate.
“Questioning what is a fair interpretation of the regulations in terms of what is legal and what isn’t. That happens on the chassis side and on the engine side.”
With the release of technical clarifications from the FIA in Austin the Red Bull boss revealed that there have been and may be more in Brazil.
“Of course, there was a few clarifications that came out over the Austin weekend, a few more yesterday and maybe a few more this weekend,” he added.
“It just shows the FIA are really policing what is a very complicated power unit with great scrutiny.”


First name:
Last name:
Email:
Phone Number:
Brisket Meal Combo:
1/4 pound, Rice, Beans, Banana Pudding
1/2 pound, Rice, Beans, Banana Pudding
1 pound, Rice, Beans, Banana Pudding
Custom Order
Pay Method:
Cash
Credit Card


--- layout: post title: pythonic is a way of thinking categories: - tutorial - python - hoto ---
Thistutorial delves into pythonic ways of coding. I'm learning from it.
tags: python, hoto, tutorial