Package ch.bailu.gtk.gtk
Klasse Gtk
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Package
ch.bailu.gtk.gtk.Gtk
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic interfacestatic interfacestatic interfacestatic interface -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic intGets the modifier mask.static StracceleratorGetLabel(int accelerator_key, int accelerator_mods) Converts an accelerator keyval and modifier mask into a string
which can be used to represent the accelerator to the user.static StracceleratorGetLabelWithKeycode(Display display, int accelerator_key, int keycode, int accelerator_mods) Converts an accelerator keyval and modifier mask
into a string that can be displayed to the user.static StracceleratorName(int accelerator_key, int accelerator_mods) Converts an accelerator keyval and modifier mask into a string
that can be parsed by [func@Gtk.accelerator_parse].static StracceleratorNameWithKeycode(Display display, int accelerator_key, int keycode, int accelerator_mods) Converts an accelerator keyval and modifier mask
into a string that can be parsed by [func@Gtk.accelerator_parse_with_keycode].static booleanacceleratorValid(int keyval, int modifiers) Determines whether a given keyval and modifier mask constitute
a valid keyboard accelerator.static voidaccessiblePropertyInitValue(int property, Value value) Initializes @value with the appropriate type for the @property.static voidaccessibleRelationInitValue(int relation, Value value) Initializes @value with the appropriate type for the @relation.static voidaccessibleStateInitValue(int state, Value value) Initializes @value with the appropriate type for the @state.static intRegisters an error quark for [class@Gtk.Builder] errors.static StrcheckVersion(int required_major, int required_minor, int required_micro) Checks that the GTK library in use is compatible with the
given version.static intRegisters an error quark for VFL error parsing.static intRegisters an error quark for CSS parsing errors.static intRegisters an error quark for CSS parsing warnings.static intRegisters an error quark for an operation that requires a dialog if
necessary.static voidPrevents GTK from using portals.static voidPrevents [func@Gtk.init] and [func@Gtk.init_check] from calling `setlocale()`.static booleaneditableDelegateGetProperty(Object object, int prop_id, Value value, ParamSpec pspec) Gets a property of the `GtkEditable` delegate for @object.static booleaneditableDelegateSetProperty(Object object, int prop_id, Value value, ParamSpec pspec) Sets a property on the `GtkEditable` delegate for @object.static inteditableInstallProperties(ObjectClass object_class, int first_prop) Overrides the `GtkEditable` properties for @class.static voidenumeratePrinters(Gtk.OnPrinterFunc func, Pointer data, Gtk.OnDestroyNotify destroy, boolean doWait) Calls a function for all printers that are known to GTK.static intRegisters an error quark for `GtkFileChooser` errors.static intReturns the binary age as passed to `libtool`.static ClassHandlerstatic intReturns the GTK debug flags that are currently active.static LanguageReturns the `PangoLanguage` for the default language
currently in effect.static intReturns the interface age as passed to `libtool`.static intGets the direction of the current locale.static intReturns the major version number of the GTK library.static intReturns the micro version number of the GTK library.static intReturns the minor version number of the GTK library.static voidConverts a color from HSV space to RGB.static intRegisters an error quark for [class@Gtk.IconTheme] errors.static voidinit()Initializes GTK.static booleanInitializes GTK.static booleanReturns whether GTK has been initialized.static NativenativeGetForSurface(Surface surface) Finds the `GtkNative` associated with the surface.static intorderingFromCmpfunc(int cmpfunc_result) Converts the result of a `GCompareFunc` like strcmp() to a
`GtkOrdering` value.static StrReturns the name of the default paper size, which
depends on the current locale.static ListpaperSizeGetPaperSizes(boolean include_custom) Creates a list of known paper sizes.static ParamSpecparamSpecExpression(Str name, Str nick, Str blurb, int flags) Creates a new `GParamSpec` instance for a property holding a `GtkExpression`.static intRegisters an error quark for `GtkPrintOperation` if necessary.static PageSetupprintRunPageSetupDialog(Window parent, PageSetup page_setup, PrintSettings settings) Runs a page setup dialog, letting the user modify the values from @page_setup.static voidprintRunPageSetupDialogAsync(Window parent, PageSetup page_setup, PrintSettings settings, Gtk.OnPageSetupDoneFunc done_cb, Pointer data) Runs a page setup dialog, letting the user modify the values from @page_setup.static intRegisters an error quark for [class@RecentManager] errors.static voidrenderActivity(StyleContext context, Context cr, double x, double y, double width, double height) Veraltet.static voidrenderArrow(StyleContext context, Context cr, double angle, double x, double y, double size) Veraltet.static voidrenderBackground(StyleContext context, Context cr, double x, double y, double width, double height) Veraltet.static voidrenderCheck(StyleContext context, Context cr, double x, double y, double width, double height) Veraltet.static voidrenderExpander(StyleContext context, Context cr, double x, double y, double width, double height) Veraltet.static voidrenderFocus(StyleContext context, Context cr, double x, double y, double width, double height) Veraltet.static voidrenderFrame(StyleContext context, Context cr, double x, double y, double width, double height) Veraltet.static voidrenderHandle(StyleContext context, Context cr, double x, double y, double width, double height) Veraltet.static voidrenderIcon(StyleContext context, Context cr, Texture texture, double x, double y) Veraltet.static voidrenderLayout(StyleContext context, Context cr, double x, double y, Layout layout) Veraltet.static voidrenderLine(StyleContext context, Context cr, double x0, double y0, double x1, double y1) Veraltet.static voidrenderOption(StyleContext context, Context cr, double x, double y, double width, double height) Veraltet.static voidConverts a color from RGB space to HSV.static voidsetDebugFlags(int flags) Sets the GTK debug flags.static voidshowAboutDialog(Window parent, Str first_property_name, Object... _ellipsis) A convenience function for showing an application’s about dialog.static voidVeraltet.static voidshowUriFull(Window parent, Str uri, int timestamp, Cancellable cancellable, Gtk.OnAsyncReadyCallback callback, Pointer user_data) Veraltet.static booleanshowUriFullFinish(Window parent, AsyncResult result) Veraltet.static voidtestAccessibleAssertionMessageRole(Str domain, Str file, int line, Str func, Str expr, Accessible accessible, int expected_role, int actual_role) Prints an assertion message for gtk_test_accessible_assert_role().static StrtestAccessibleCheckProperty(Accessible accessible, int property, Object... _ellipsis) Checks whether the accessible @property of @accessible is set to
a specific value.static StrtestAccessibleCheckRelation(Accessible accessible, int relation, Object... _ellipsis) Checks whether the accessible @relation of @accessible is set to
a specific value.static StrtestAccessibleCheckState(Accessible accessible, int state, Object... _ellipsis) Checks whether the accessible @state of @accessible is set to
a specific value.static booleantestAccessibleHasProperty(Accessible accessible, int property) Checks whether the `GtkAccessible` has @property set.static booleantestAccessibleHasRelation(Accessible accessible, int relation) Checks whether the `GtkAccessible` has @relation set.static booleantestAccessibleHasRole(Accessible accessible, int role) Checks whether the `GtkAccessible:accessible-role` of the accessible
is @role.static booleantestAccessibleHasState(Accessible accessible, int state) Checks whether the `GtkAccessible` has @state set.static voidThis function is used to initialize a GTK test program.static voidForce registration of all core GTK object types.static voidtestWidgetWaitForDraw(Widget widget) Enters the main loop and waits for @widget to be “drawn”.static ContentProvidertreeCreateRowDragContent(TreeModel tree_model, TreePath path) Veraltet.static voidtreeRowReferenceDeleted(Object proxy, TreePath path) Veraltet.static voidtreeRowReferenceInserted(Object proxy, TreePath path) Veraltet.static voidtreeRowReferenceReordered(Object proxy, TreePath path, TreeIter iter, Int new_order) Veraltet.static ExpressionvalueDupExpression(Value value) Retrieves the `GtkExpression` stored inside the given `value`, and acquires
a reference to it.static ExpressionvalueGetExpression(Value value) Retrieves the `GtkExpression` stored inside the given `value`.static voidvalueSetExpression(Value value, Expression expression) Stores the given `GtkExpression` inside `value`.static voidvalueTakeExpression(Value value, Expression expression) Stores the given `GtkExpression` inside `value`.Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
-
Konstruktordetails
-
Gtk
public Gtk()
-
-
Methodendetails
-
getClassHandler
-
acceleratorGetDefaultModMask
public static int acceleratorGetDefaultModMask()Gets the modifier mask.
The modifier mask determines which modifiers are considered significant
for keyboard accelerators. This includes all keyboard modifiers except
for `GDK_LOCK_MASK`.- Gibt zurück:
- the modifier mask for accelerators
-
acceleratorGetLabel
Converts an accelerator keyval and modifier mask into a string
which can be used to represent the accelerator to the user.- Parameter:
accelerator_key- accelerator keyvalaccelerator_mods- accelerator modifier mask- Gibt zurück:
- a newly-allocated string representing the accelerator
-
acceleratorGetLabelWithKeycode
public static Str acceleratorGetLabelWithKeycode(@Nullable Display display, int accelerator_key, int keycode, int accelerator_mods) Converts an accelerator keyval and modifier mask
into a string that can be displayed to the user.
The string may be translated.
This function is similar to [func@Gtk.accelerator_get_label],
but handling keycodes. This is only useful for system-level
components, applications should use [func@Gtk.accelerator_get_label]
instead.- Parameter:
display- a `GdkDisplay`accelerator_key- accelerator keyvalkeycode- accelerator keycodeaccelerator_mods- accelerator modifier mask- Gibt zurück:
- a newly-allocated string representing the accelerator
-
acceleratorName
Converts an accelerator keyval and modifier mask into a string
that can be parsed by [func@Gtk.accelerator_parse].
For example, if you pass in `GDK_KEY_q` and `GDK_CONTROL_MASK`,
this function returns `<Control>q`.
If you need to display accelerators in the user interface,
see [func@Gtk.accelerator_get_label].- Parameter:
accelerator_key- accelerator keyvalaccelerator_mods- accelerator modifier mask- Gibt zurück:
- a newly-allocated accelerator name
-
acceleratorNameWithKeycode
public static Str acceleratorNameWithKeycode(@Nullable Display display, int accelerator_key, int keycode, int accelerator_mods) Converts an accelerator keyval and modifier mask
into a string that can be parsed by [func@Gtk.accelerator_parse_with_keycode].
This is similar to [func@Gtk.accelerator_name] but handling keycodes.
This is only useful for system-level components, applications
should use [func@Gtk.accelerator_name] instead.- Parameter:
display- a `GdkDisplay`accelerator_key- accelerator keyvalkeycode- accelerator keycodeaccelerator_mods- accelerator modifier mask- Gibt zurück:
- a newly allocated accelerator name.
-
acceleratorValid
public static boolean acceleratorValid(int keyval, int modifiers) Determines whether a given keyval and modifier mask constitute
a valid keyboard accelerator.
For example, the `GDK_KEY_a` keyval plus `GDK_CONTROL_MASK` mask is valid,
and matches the “Ctrl+a” accelerator. But, you can't, for instance, use
the `GDK_KEY_Control_L` keyval as an accelerator.- Parameter:
keyval- a GDK keyvalmodifiers- modifier mask- Gibt zurück:
- true if the accelerator is valid
-
accessiblePropertyInitValue
Initializes @value with the appropriate type for the @property.
This function is mostly meant for language bindings, in conjunction
with gtk_accessible_update_property_value().- Parameter:
property- a `GtkAccessibleProperty`value- an uninitialized `GValue`
-
accessibleRelationInitValue
Initializes @value with the appropriate type for the @relation.
This function is mostly meant for language bindings, in conjunction
with gtk_accessible_update_relation_value().- Parameter:
relation- a `GtkAccessibleRelation`value- an uninitialized `GValue`
-
accessibleStateInitValue
Initializes @value with the appropriate type for the @state.
This function is mostly meant for language bindings, in conjunction
with gtk_accessible_update_relation_state().- Parameter:
state- a `GtkAccessibleState`value- an uninitialized `GValue`
-
builderErrorQuark
public static int builderErrorQuark()Registers an error quark for [class@Gtk.Builder] errors.- Gibt zurück:
- the error quark
-
checkVersion
Checks that the GTK library in use is compatible with the
given version.
Generally you would pass in the constants %GTK_MAJOR_VERSION,
%GTK_MINOR_VERSION, %GTK_MICRO_VERSION as the three arguments
to this function; that produces a check that the library in
use is compatible with the version of GTK the application or
module was compiled against.
Compatibility is defined by two things: first the version
of the running library is newer than the version
@required_major.required_minor.@required_micro. Second
the running library must be binary compatible with the
version @required_major.required_minor.@required_micro
(same major version.)
This function is primarily for GTK modules; the module
can call this function to check that it wasn’t loaded
into an incompatible version of GTK. However, such a
check isn’t completely reliable, since the module may be
linked against an old version of GTK and calling the
old version of gtk_check_version(), but still get loaded
into an application using a newer version of GTK.- Parameter:
required_major- the required major versionrequired_minor- the required minor versionrequired_micro- the required micro version- Gibt zurück:
- %NULL if the GTK library is compatible with the given version, or a string describing the version mismatch. The returned string is owned by GTK and should not be modified or freed.
-
constraintVflParserErrorQuark
public static int constraintVflParserErrorQuark()Registers an error quark for VFL error parsing.- Gibt zurück:
- the error quark
-
cssParserErrorQuark
public static int cssParserErrorQuark()Registers an error quark for CSS parsing errors.- Gibt zurück:
- the error quark
-
cssParserWarningQuark
public static int cssParserWarningQuark()Registers an error quark for CSS parsing warnings.- Gibt zurück:
- the warning quark
-
dialogErrorQuark
public static int dialogErrorQuark()Registers an error quark for an operation that requires a dialog if
necessary.- Gibt zurück:
- the error quark
-
disablePortals
public static void disablePortals()Prevents GTK from using portals.
This is equivalent to setting `GDK_DEBUG=no-portals` in the environment.
This should only be used in portal implementations, apps must not call it. -
disableSetlocale
public static void disableSetlocale()Prevents [func@Gtk.init] and [func@Gtk.init_check] from calling `setlocale()`.
You would want to use this function if you wanted to set the locale for
your program to something other than the user’s locale, or if you wanted
to set different values for different locale categories.
Most programs should not need to call this function. -
editableDelegateGetProperty
public static boolean editableDelegateGetProperty(@Nonnull Object object, int prop_id, @Nonnull Value value, @Nonnull ParamSpec pspec) Gets a property of the `GtkEditable` delegate for @object.
This is helper function that should be called in the `get_property`
function of your `GtkEditable` implementation, before handling your
own properties.- Parameter:
object- a `GObject`prop_id- a property IDvalue- value to setpspec- the `GParamSpec` for the property- Gibt zurück:
- %TRUE if the property was found
-
editableDelegateSetProperty
public static boolean editableDelegateSetProperty(@Nonnull Object object, int prop_id, @Nonnull Value value, @Nonnull ParamSpec pspec) Sets a property on the `GtkEditable` delegate for @object.
This is a helper function that should be called in the `set_property`
function of your `GtkEditable` implementation, before handling your
own properties.- Parameter:
object- a `GObject`prop_id- a property IDvalue- value to setpspec- the `GParamSpec` for the property- Gibt zurück:
- %TRUE if the property was found
-
editableInstallProperties
Overrides the `GtkEditable` properties for @class.
This is a helper function that should be called in class_init,
after installing your own properties.
Note that your class must have "text", "cursor-position",
"selection-bound", "editable", "width-chars", "max-width-chars",
"xalign" and "enable-undo" properties for this function to work.
To handle the properties in your set_property and get_property
functions, you can either use [func@Gtk.Editable.delegate_set_property]
and [func@Gtk.Editable.delegate_get_property] (if you are using
a delegate), or remember the @first_prop offset and add it to the
values in the [enum@Gtk.EditableProperties] enumeration to get the
property IDs for these properties.- Parameter:
object_class- a `GObjectClass`first_prop- property ID to use for the first property- Gibt zurück:
- the number of properties that were installed
-
enumeratePrinters
public static void enumeratePrinters(Gtk.OnPrinterFunc func, @Nullable Pointer data, Gtk.OnDestroyNotify destroy, boolean doWait) Calls a function for all printers that are known to GTK.
If @func returns true, the enumeration is stopped.- Parameter:
func- a function to call for each printerdata- user data to pass to @funcdestroy- function to call if @data is no longer neededdoWait- if true, wait in a recursive mainloop until all printers are enumerated; otherwise return early
-
fileChooserErrorQuark
public static int fileChooserErrorQuark()Registers an error quark for `GtkFileChooser` errors.- Gibt zurück:
- The error quark used for `GtkFileChooser` errors.
-
getBinaryAge
public static int getBinaryAge()Returns the binary age as passed to `libtool`.
If `libtool` means nothing to you, don't worry about it.- Gibt zurück:
- the binary age of the GTK library
-
getDebugFlags
public static int getDebugFlags()Returns the GTK debug flags that are currently active.
This function is intended for GTK modules that want
to adjust their debug output based on GTK debug flags.- Gibt zurück:
- the GTK debug flags.
-
getDefaultLanguage
Returns the `PangoLanguage` for the default language
currently in effect.
Note that this can change over the life of an
application.
The default language is derived from the current
locale. It determines, for example, whether GTK uses
the right-to-left or left-to-right text direction.
This function is equivalent to [func@Pango.Language.get_default].
See that function for details.- Gibt zurück:
- the default language
-
getInterfaceAge
public static int getInterfaceAge()Returns the interface age as passed to `libtool`.
If `libtool` means nothing to you, don't worry about it.- Gibt zurück:
- the interface age of the GTK library
-
getLocaleDirection
public static int getLocaleDirection()Gets the direction of the current locale.
This is the expected reading direction for text and UI.
This function depends on the current locale being set with
`setlocale()` and will default to setting the `GTK_TEXT_DIR_LTR`
direction otherwise. `GTK_TEXT_DIR_NONE` will never be returned.
GTK sets the default text direction according to the locale during
[func@Gtk.init], and you should normally use [method@Gtk.Widget.get_direction]
or [func@Gtk.Widget.get_default_direction] to obtain the current direction.
This function is only needed rare cases when the locale is
changed after GTK has already been initialized. In this case,
you can use it to update the default text direction as follows:
<!-- language="C" --> #include <locale.h> static void update_locale (const char *new_locale) { setlocale (LC_ALL, new_locale); gtk_widget_set_default_direction (gtk_get_locale_direction ()); }- Gibt zurück:
- the direction of the current locale
-
getMajorVersion
public static int getMajorVersion()Returns the major version number of the GTK library.
For example, in GTK version 3.1.5 this is 3.
This function is in the library, so it represents the GTK library
your code is running against. Contrast with the %GTK_MAJOR_VERSION
macro, which represents the major version of the GTK headers you
have included when compiling your code.- Gibt zurück:
- the major version number of the GTK library
-
getMicroVersion
public static int getMicroVersion()Returns the micro version number of the GTK library.
For example, in GTK version 3.1.5 this is 5.
This function is in the library, so it represents the GTK library
your code is are running against. Contrast with the
%GTK_MICRO_VERSION macro, which represents the micro version of the
GTK headers you have included when compiling your code.- Gibt zurück:
- the micro version number of the GTK library
-
getMinorVersion
public static int getMinorVersion()Returns the minor version number of the GTK library.
For example, in GTK version 3.1.5 this is 1.
This function is in the library, so it represents the GTK library
your code is are running against. Contrast with the
%GTK_MINOR_VERSION macro, which represents the minor version of the
GTK headers you have included when compiling your code.- Gibt zurück:
- the minor version number of the GTK library
-
hsvToRgb
public static void hsvToRgb(float h, float s, float v, @Nonnull Flt r, @Nonnull Flt g, @Nonnull Flt b) Converts a color from HSV space to RGB.
Input values must be in the [0.0, 1.0] range;
output values will be in the same range.- Parameter:
h- Hues- Saturationv- Valuer- Return value for the red componentg- Return value for the green componentb- Return value for the blue component
-
iconThemeErrorQuark
public static int iconThemeErrorQuark()Registers an error quark for [class@Gtk.IconTheme] errors.- Gibt zurück:
- the error quark
-
init
public static void init()Initializes GTK.
This function must be called before using any other GTK functions
in your GUI applications.
It will initialize everything needed to operate the toolkit. In particular,
it will open the default display (see [func@Gdk.Display.get_default]).
If you are using [class@Gtk.Application], you usually don't have to call this
function; the [vfunc@Gio.Application.startup] handler does it for you. Though,
if you are using `GApplication` methods that will be invoked before `startup`,
such as `local_command_line`, you may need to initialize GTK explicitly.
This function will terminate your program if it was unable to initialize
the windowing system for some reason. If you want your program to fall back
to a textual interface, call [func@Gtk.init_check] instead.
GTK calls `signal (SIGPIPE, SIG_IGN)` during initialization, to ignore
SIGPIPE signals, since these are almost never wanted in graphical
applications. If you do need to handle SIGPIPE for some reason, reset
the handler after gtk_init(), but notice that other libraries (e.g.
libdbus or gvfs) might do similar things. -
initCheck
public static boolean initCheck()Initializes GTK.
This function does the same work as [func@Gtk.init] with only a
single change: It does not terminate the program if the windowing
system can’t be initialized. Instead it returns false on failure.
This way the application can fall back to some other means of
communication with the user - for example a curses or command line
interface.- Gibt zurück:
- true if the windowing system has been successfully initialized, false otherwise
-
isInitialized
public static boolean isInitialized()Returns whether GTK has been initialized.
See [func@Gtk.init].- Gibt zurück:
- the initialization status
-
nativeGetForSurface
Finds the `GtkNative` associated with the surface.- Parameter:
surface- a `GdkSurface`- Gibt zurück:
- the `GtkNative` that is associated with @surface
-
orderingFromCmpfunc
public static int orderingFromCmpfunc(int cmpfunc_result) Converts the result of a `GCompareFunc` like strcmp() to a
`GtkOrdering` value.- Parameter:
cmpfunc_result- Result of a comparison function- Gibt zurück:
- the corresponding `GtkOrdering`
-
paperSizeGetDefault
Returns the name of the default paper size, which
depends on the current locale.- Gibt zurück:
- the name of the default paper size. The string is owned by GTK and should not be modified.
-
paperSizeGetPaperSizes
Creates a list of known paper sizes.- Parameter:
include_custom- whether to include custom paper sizes as defined in the page setup dialog- Gibt zurück:
- a newly allocated list of newly allocated `GtkPaperSize` objects
-
paramSpecExpression
public static ParamSpec paramSpecExpression(@Nonnull Str name, @Nonnull Str nick, @Nonnull Str blurb, int flags) Creates a new `GParamSpec` instance for a property holding a `GtkExpression`.
See `g_param_spec_internal()` for details on the property strings.- Parameter:
name- canonical name of the propertynick- a user-readable name for the propertyblurb- a user-readable description of the propertyflags- flags for the property- Gibt zurück:
- a newly created property specification
-
printErrorQuark
public static int printErrorQuark()Registers an error quark for `GtkPrintOperation` if necessary.- Gibt zurück:
- The error quark used for `GtkPrintOperation` errors.
-
printRunPageSetupDialog
public static PageSetup printRunPageSetupDialog(@Nullable Window parent, @Nullable PageSetup page_setup, @Nonnull PrintSettings settings) Runs a page setup dialog, letting the user modify the values from @page_setup.
If the user cancels the dialog, the returned `GtkPageSetup` is identical
to the passed in @page_setup, otherwise it contains the modifications
done in the dialog.
Note that this function may use a recursive mainloop to show the page
setup dialog. See [func@Gtk.print_run_page_setup_dialog_async] if this is
a problem.- Parameter:
parent- transient parentpage_setup- an existing `GtkPageSetup`settings- a `GtkPrintSettings`- Gibt zurück:
- a new `GtkPageSetup`
-
printRunPageSetupDialogAsync
public static void printRunPageSetupDialogAsync(@Nullable Window parent, @Nullable PageSetup page_setup, @Nonnull PrintSettings settings, Gtk.OnPageSetupDoneFunc done_cb, @Nullable Pointer data) Runs a page setup dialog, letting the user modify the values from @page_setup.
In contrast to [func@Gtk.print_run_page_setup_dialog], this function returns
after showing the page setup dialog on platforms that support this, and calls
@done_cb from a signal handler for the ::response signal of the dialog.- Parameter:
parent- transient parentpage_setup- an existing `GtkPageSetup`settings- a `GtkPrintSettings`done_cb- a function to call when the user saves the modified page setupdata- user data to pass to @done_cb
-
recentManagerErrorQuark
public static int recentManagerErrorQuark()Registers an error quark for [class@RecentManager] errors.- Gibt zurück:
- the error quark
-
renderActivity
@Deprecated public static void renderActivity(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, double width, double height) Veraltet.Renders an activity indicator (such as in `GtkSpinner`).
The state %GTK_STATE_FLAG_CHECKED determines whether there is
activity going on.- Parameter:
context- a `GtkStyleContext`cr- a `cairo_t`x- X origin of the rectangley- Y origin of the rectanglewidth- rectangle widthheight- rectangle height
-
renderArrow
@Deprecated public static void renderArrow(@Nonnull StyleContext context, @Nonnull Context cr, double angle, double x, double y, double size) Veraltet.Renders an arrow pointing to @angle.
Typical arrow rendering at 0, 1⁄2 π;, π; and 3⁄2 π:
- Parameter:
context- a `GtkStyleContext`cr- a `cairo_t`angle- arrow angle from 0 to 2 * %G_PI, being 0 the arrow pointing to the northx- X origin of the render areay- Y origin of the render areasize- square side for render area
-
renderBackground
@Deprecated public static void renderBackground(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, double width, double height) Veraltet.Renders the background of an element.
Typical background rendering, showing the effect of
`background-image`, `border-width` and `border-radius`:
- Parameter:
context- a `GtkStyleContext`cr- a `cairo_t`x- X origin of the rectangley- Y origin of the rectanglewidth- rectangle widthheight- rectangle height
-
renderCheck
@Deprecated public static void renderCheck(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, double width, double height) Veraltet.Renders a checkmark (as in a `GtkCheckButton`).
The %GTK_STATE_FLAG_CHECKED state determines whether the check is
on or off, and %GTK_STATE_FLAG_INCONSISTENT determines whether it
should be marked as undefined.
Typical checkmark rendering:
- Parameter:
context- a `GtkStyleContext`cr- a `cairo_t`x- X origin of the rectangley- Y origin of the rectanglewidth- rectangle widthheight- rectangle height
-
renderExpander
@Deprecated public static void renderExpander(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, double width, double height) Veraltet.Renders an expander (as used in `GtkTreeView` and `GtkExpander`) in the area
defined by @x, @y, @width, @height. The state %GTK_STATE_FLAG_CHECKED
determines whether the expander is collapsed or expanded.
Typical expander rendering:
- Parameter:
context- a `GtkStyleContext`cr- a `cairo_t`x- X origin of the rectangley- Y origin of the rectanglewidth- rectangle widthheight- rectangle height
-
renderFocus
@Deprecated public static void renderFocus(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, double width, double height) Veraltet.Renders a focus indicator on the rectangle determined by @x, @y, @width, @height.
Typical focus rendering:
- Parameter:
context- a `GtkStyleContext`cr- a `cairo_t`x- X origin of the rectangley- Y origin of the rectanglewidth- rectangle widthheight- rectangle height
-
renderFrame
@Deprecated public static void renderFrame(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, double width, double height) Veraltet.Renders a frame around the rectangle defined by @x, @y, @width, @height.
Examples of frame rendering, showing the effect of `border-image`,
`border-color`, `border-width`, `border-radius` and junctions:
- Parameter:
context- a `GtkStyleContext`cr- a `cairo_t`x- X origin of the rectangley- Y origin of the rectanglewidth- rectangle widthheight- rectangle height
-
renderHandle
@Deprecated public static void renderHandle(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, double width, double height) Veraltet.Renders a handle (as in `GtkPaned` and `GtkWindow`’s resize grip),
in the rectangle determined by @x, @y, @width, @height.
Handles rendered for the paned and grip classes:
- Parameter:
context- a `GtkStyleContext`cr- a `cairo_t`x- X origin of the rectangley- Y origin of the rectanglewidth- rectangle widthheight- rectangle height
-
renderIcon
@Deprecated public static void renderIcon(@Nonnull StyleContext context, @Nonnull Context cr, @Nonnull Texture texture, double x, double y) Veraltet.Renders the icon in @texture at the specified @x and @y coordinates.
This function will render the icon in @texture at exactly its size,
regardless of scaling factors, which may not be appropriate when
drawing on displays with high pixel densities.- Parameter:
context- a `GtkStyleContext`cr- a `cairo_t`texture- a `GdkTexture` containing the icon to drawx- X position for the @texturey- Y position for the @texture
-
renderLayout
@Deprecated public static void renderLayout(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, @Nonnull Layout layout) Veraltet.Renders @layout on the coordinates @x, @y- Parameter:
context- a `GtkStyleContext`cr- a `cairo_t`x- X originy- Y originlayout- the `PangoLayout` to render
-
renderLine
@Deprecated public static void renderLine(@Nonnull StyleContext context, @Nonnull Context cr, double x0, double y0, double x1, double y1) Veraltet.Renders a line from (x0, y0) to (x1, y1).- Parameter:
context- a `GtkStyleContext`cr- a `cairo_t`x0- X coordinate for the origin of the liney0- Y coordinate for the origin of the linex1- X coordinate for the end of the liney1- Y coordinate for the end of the line
-
renderOption
@Deprecated public static void renderOption(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, double width, double height) Veraltet.Renders an option mark (as in a radio button), the %GTK_STATE_FLAG_CHECKED
state will determine whether the option is on or off, and
%GTK_STATE_FLAG_INCONSISTENT whether it should be marked as undefined.
Typical option mark rendering:
- Parameter:
context- a `GtkStyleContext`cr- a `cairo_t`x- X origin of the rectangley- Y origin of the rectanglewidth- rectangle widthheight- rectangle height
-
rgbToHsv
public static void rgbToHsv(float r, float g, float b, @Nonnull Flt h, @Nonnull Flt s, @Nonnull Flt v) Converts a color from RGB space to HSV.
Input values must be in the [0.0, 1.0] range;
output values will be in the same range.- Parameter:
r- Redg- Greenb- Blueh- Return value for the hue components- Return value for the saturation componentv- Return value for the value component
-
setDebugFlags
public static void setDebugFlags(int flags) Sets the GTK debug flags.- Parameter:
flags- the debug flags to set
-
showAboutDialog
public static void showAboutDialog(@Nullable Window parent, @Nonnull Str first_property_name, Object... _ellipsis) A convenience function for showing an application’s about dialog.
The constructed dialog is associated with the parent window and
reused for future invocations of this function.- Parameter:
parent- the parent top-level windowfirst_property_name- the name of the first property_ellipsis- value of first property, followed by more pairs of property name and value, `NULL`-terminated
-
showUri
Veraltet.This function launches the default application for showing
a given uri, or shows an error dialog if that fails.- Parameter:
parent- parent windowuri- the uri to showtimestamp- timestamp from the event that triggered this call, or %GDK_CURRENT_TIME
-
showUriFull
@Deprecated public static void showUriFull(@Nullable Window parent, @Nonnull Str uri, int timestamp, @Nullable Cancellable cancellable, Gtk.OnAsyncReadyCallback callback, @Nullable Pointer user_data) Veraltet.This function launches the default application for showing
a given uri.
The @callback will be called when the launch is completed.
This is the recommended call to be used as it passes information
necessary for sandbox helpers to parent their dialogs properly.- Parameter:
parent- parent windowuri- the uri to showtimestamp- timestamp from the event that triggered this call, or %GDK_CURRENT_TIMEcancellable- a `GCancellable` to cancel the launchcallback- a callback to call when the action is completeuser_data- data to pass to @callback
-
showUriFullFinish
@Deprecated public static boolean showUriFullFinish(@Nonnull Window parent, @Nonnull AsyncResult result) throws AllocationError Veraltet.Finishes the gtk_show_uri() call and returns the result
of the operation.- Parameter:
parent- the `GtkWindow` passed to gtk_show_uri()result- `GAsyncResult` that was passed to @callback- Gibt zurück:
- %TRUE if the URI was shown successfully. Otherwise, %FALSE is returned and @error is set
- Löst aus:
AllocationError
-
testAccessibleAssertionMessageRole
public static void testAccessibleAssertionMessageRole(@Nonnull Str domain, @Nonnull Str file, int line, @Nonnull Str func, @Nonnull Str expr, @Nonnull Accessible accessible, int expected_role, int actual_role) Prints an assertion message for gtk_test_accessible_assert_role().- Parameter:
domain- a domainfile- a file nameline- the line in @filefunc- a function name in @fileexpr- the expression being testedaccessible- a `GtkAccessible`expected_role- the expected `GtkAccessibleRole`actual_role- the actual `GtkAccessibleRole`
-
testAccessibleCheckProperty
public static Str testAccessibleCheckProperty(@Nonnull Accessible accessible, int property, Object... _ellipsis) Checks whether the accessible @property of @accessible is set to
a specific value.- Parameter:
accessible- a `GtkAccessible`property- a `GtkAccessibleProperty`_ellipsis- the expected value of @property- Gibt zurück:
- the value of the accessible property
-
testAccessibleCheckRelation
public static Str testAccessibleCheckRelation(@Nonnull Accessible accessible, int relation, Object... _ellipsis) Checks whether the accessible @relation of @accessible is set to
a specific value.- Parameter:
accessible- a `GtkAccessible`relation- a `GtkAccessibleRelation`_ellipsis- the expected value of @relation- Gibt zurück:
- the value of the accessible relation
-
testAccessibleCheckState
public static Str testAccessibleCheckState(@Nonnull Accessible accessible, int state, Object... _ellipsis) Checks whether the accessible @state of @accessible is set to
a specific value.- Parameter:
accessible- a `GtkAccessible`state- a `GtkAccessibleState`_ellipsis- the expected value of @state- Gibt zurück:
- the value of the accessible state
-
testAccessibleHasProperty
Checks whether the `GtkAccessible` has @property set.- Parameter:
accessible- a `GtkAccessible`property- a `GtkAccessibleProperty`- Gibt zurück:
- %TRUE if the @property is set in the @accessible
-
testAccessibleHasRelation
Checks whether the `GtkAccessible` has @relation set.- Parameter:
accessible- a `GtkAccessible`relation- a `GtkAccessibleRelation`- Gibt zurück:
- %TRUE if the @relation is set in the @accessible
-
testAccessibleHasRole
Checks whether the `GtkAccessible:accessible-role` of the accessible
is @role.- Parameter:
accessible- a `GtkAccessible`role- a `GtkAccessibleRole`- Gibt zurück:
- %TRUE if the role matches
-
testAccessibleHasState
Checks whether the `GtkAccessible` has @state set.- Parameter:
accessible- a `GtkAccessible`state- a `GtkAccessibleState`- Gibt zurück:
- %TRUE if the @state is set in the @accessible
-
testInit
This function is used to initialize a GTK test program.
It will in turn call g_test_init() and gtk_init() to properly
initialize the testing framework and graphical toolkit. It’ll
also set the program’s locale to “C”. This is done to make test
program environments as deterministic as possible.
Like gtk_init() and g_test_init(), any known arguments will be
processed and stripped from @argc and @argv.- Parameter:
argcp- Address of the `argc` parameter of the main() function. Changed if any arguments were handled.argvp- Address of the `argv` parameter of main(). Any parameters understood by g_test_init() or gtk_init() are stripped before return._ellipsis- currently unused
-
testRegisterAllTypes
public static void testRegisterAllTypes()Force registration of all core GTK object types.
This allows to refer to any of those object types via
g_type_from_name() after calling this function. -
testWidgetWaitForDraw
Enters the main loop and waits for @widget to be “drawn”.
In this context that means it waits for the frame clock of
@widget to have run a full styling, layout and drawing cycle.
This function is intended to be used for syncing with actions that
depend on @widget relayouting or on interaction with the display
server.- Parameter:
widget- the widget to wait for
-
treeCreateRowDragContent
@Deprecated public static ContentProvider treeCreateRowDragContent(@Nonnull TreeModel tree_model, @Nonnull TreePath path) Veraltet.Creates a content provider for dragging @path from @tree_model.- Parameter:
tree_model- a `GtkTreeModel`path- a row in @tree_model- Gibt zurück:
- a new `GdkContentProvider`
-
treeRowReferenceDeleted
@Deprecated public static void treeRowReferenceDeleted(@Nonnull Object proxy, @Nonnull TreePath path) Veraltet.Lets a set of row reference created by
gtk_tree_row_reference_new_proxy() know that the
model emitted the ::row-deleted signal.- Parameter:
proxy- a `GObject`path- the path position that was deleted
-
treeRowReferenceInserted
@Deprecated public static void treeRowReferenceInserted(@Nonnull Object proxy, @Nonnull TreePath path) Veraltet.Lets a set of row reference created by
gtk_tree_row_reference_new_proxy() know that the
model emitted the ::row-inserted signal.- Parameter:
proxy- a `GObject`path- the row position that was inserted
-
treeRowReferenceReordered
@Deprecated public static void treeRowReferenceReordered(@Nonnull Object proxy, @Nonnull TreePath path, @Nonnull TreeIter iter, @Nonnull Int new_order) Veraltet.Lets a set of row reference created by
gtk_tree_row_reference_new_proxy() know that the
model emitted the ::rows-reordered signal.- Parameter:
proxy- a `GObject`path- the parent path of the reordered signaliter- the iter pointing to the parent of the reorderednew_order- the new order of rows
-
valueDupExpression
Retrieves the `GtkExpression` stored inside the given `value`, and acquires
a reference to it.- Parameter:
value- a `GValue` initialized with type `GTK_TYPE_EXPRESSION`- Gibt zurück:
- a `GtkExpression`
-
valueGetExpression
Retrieves the `GtkExpression` stored inside the given `value`.- Parameter:
value- a `GValue` initialized with type `GTK_TYPE_EXPRESSION`- Gibt zurück:
- a `GtkExpression`
-
valueSetExpression
Stores the given `GtkExpression` inside `value`.
The `GValue` will acquire a reference to the `expression`.- Parameter:
value- a `GValue` initialized with type `GTK_TYPE_EXPRESSION`expression- a `GtkExpression`
-
valueTakeExpression
Stores the given `GtkExpression` inside `value`.
This function transfers the ownership of the `expression` to the `GValue`.- Parameter:
value- a `GValue` initialized with type `GTK_TYPE_EXPRESSION`expression- a `GtkExpression`
-