Commit 12505bdea33a155a9f2a11a7af2d5222c085a094

Authored by perry.werneck@gmail.com
1 parent 8b34a92e

Implementando plugin exemplo

Showing 1 changed file with 20 additions and 1 deletions   Show diff stats
src/plugins/sample/main.c
... ... @@ -32,18 +32,37 @@
32 32  
33 33 /*--[ Implement ]---------------------------------------------------------------------------------------------------------*/
34 34  
  35 + /**
  36 + * @brief Method called when the terminal connects to host.
  37 + *
  38 + * @param terminal Terminal widget.
  39 + * @param host Connected host.
  40 + * @param window Application window.
  41 + *
  42 + */
35 43 static void connected(GtkWidget *terminal, const gchar *host, GtkWidget * window) {
36 44  
37   - g_message("%s",__FUNCTION__);
  45 + g_message("%s - %s",__FUNCTION__,host);
38 46  
39 47 }
40 48  
  49 + /**
  50 + * @brief Method called when the terminal loses connection with the host.
  51 + *
  52 + * @param terminal Terminal widget.
  53 + * @param window Application window.
  54 + *
  55 + */
41 56 static void disconnected(GtkWidget *terminal, GtkWidget * window) {
42 57  
43 58 g_message("%s",__FUNCTION__);
44 59  
45 60 }
46 61  
  62 + /**
  63 + * @brief Plugin has started.
  64 + *
  65 + */
47 66 LIB3270_EXPORT int pw3270_plugin_start(GtkWidget *window) {
48 67  
49 68 GtkWidget * terminal = pw3270_get_terminal_widget(window);
... ...