From: <kr_...@us...> - 2003-03-26 19:20:54
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK In directory sc8-pr-cvs1:/tmp/cvs-serv31265/port/src/cbits/GTK Modified Files: Window.c Log Message: Added implementation for tooltips Index: Window.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Window.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Window.c 26 Mar 2003 15:39:48 -0000 1.9 --- Window.c 26 Mar 2003 19:20:20 -0000 1.10 *************** *** 733,736 **** --- 733,756 ---- } + static GtkTooltips *gTooltips; + + void osSetControlTip(WindowHandle ctrl, char *text) + { + if (!gTooltips) + gTooltips = gtk_tooltips_new(); + + gtk_tooltips_set_tip(gTooltips, ctrl, text, NULL); + } + + char *osGetControlTip(WindowHandle ctrl) + { + GtkTooltipsData *tips_data; + if (!gTooltips) + return NULL; + + tips_data = gtk_tooltips_data_get(ctrl); + return strdup(tips_data->tip_text); + } + void osSetWindowRect(WindowHandle window, int x0, int y0, int x1, int y1) { |