Commit 35978683fbe0e68bdf264693fd37699a1c973fe0

Authored by perry.werneck@gmail.com
1 parent 547cfa89
Exists in master and in 1 other branch develop

Reativando indicador de script ativo

Showing 1 changed file with 18 additions and 0 deletions   Show diff stats
widget.c
... ... @@ -1514,3 +1514,21 @@ gboolean v3270_is_connected(GtkWidget *widget)
1514 1514 return lib3270_connected(GTK_V3270(widget)->host) ? TRUE : FALSE;
1515 1515 }
1516 1516  
  1517 +GtkWidget * v3270_get_default_widget(void)
  1518 +{
  1519 + H3270 * hSession = lib3270_get_default_session_handle();
  1520 +
  1521 + if(!hSession)
  1522 + {
  1523 + g_warning("No default session available on %s",__FUNCTION__);
  1524 + return NULL;
  1525 + }
  1526 +
  1527 + if(!(hSession->widget && GTK_IS_V3270(hSession->widget)))
  1528 + {
  1529 + g_warning("No widget on default session on %s",__FUNCTION__);
  1530 + return NULL;
  1531 + }
  1532 +
  1533 + return GTK_WIDGET(hSession->widget);
  1534 +}
... ...