Added GTK widget tooltip support.

This commit is contained in:
nathan 2017-07-24 14:31:40 +02:00
parent e191faa3b8
commit b73fef825d
3 changed files with 16 additions and 10 deletions

View File

@ -376,7 +376,6 @@ interface Gtk {
*/
Pointer gtk_image_menu_item_new_from_stock(String stock_id, Pointer accel_group);
/**
* A convenience function for launching the default application to show the uri. Like gtk_show_uri_on_window(), but takes a screen
* as transient parent instead of a window.
@ -386,5 +385,13 @@ interface Gtk {
*/
@Deprecated
boolean gtk_show_uri(Pointer screen, String uri, int timestamp, Pointer error);
/**
* Sets text as the contents of the tooltip. This function will take care of setting has-tooltip to TRUE and of the default
* handler for the query-tooltip signal. Null text will remove the tooltip
*
* @since 2.12
*/
void gtk_widget_set_tooltip_text(Pointer widget, String text);
}

View File

@ -194,4 +194,8 @@ class Gtk2 implements Gtk {
@Override
public native
boolean gtk_show_uri(final Pointer screen, final String uri, final int timestamp, final Pointer error);
@Override
public native
void gtk_widget_set_tooltip_text(final Pointer widget, final String text);
}

View File

@ -32,15 +32,6 @@ class Gtk3 implements Gtk {
// objdump -T /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 | grep gtk
// objdump -T /usr/local/lib/libgtk-3.so.0 | grep gtk
public native
int gtk_get_major_version();
public native
int gtk_get_minor_version();
public native
int gtk_get_micro_version();
/**
* Retrieves the minimum and natural size of a widget, taking into account the widgets preference for height-for-width management.
* <p>
@ -263,4 +254,8 @@ class Gtk3 implements Gtk {
@Override
public native
boolean gtk_show_uri(final Pointer screen, final String uri, final int timestamp, final Pointer error);
@Override
public native
void gtk_widget_set_tooltip_text(final Pointer widget, final String text);
}