Back to index

bamf  0.2.120
Functions | Variables
interaction-tester.c File Reference
#include <stdio.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <glib.h>
#include <libbamf/libbamf.h>

Go to the source code of this file.

Functions

static void destroy (GtkWidget *widget, gpointer data)
static void handle_view_opened (BamfMatcher *matcher, BamfView *view, gpointer data)
static void handle_view_closed (BamfMatcher *matcher, BamfView *view, gpointer data)
static void begin_testing ()
int main (int argc, char **argv)

Variables

static GtkWidget * window
static BamfMatcher * matcher
static BamfControl * control

Function Documentation

static void begin_testing ( ) [static]

Definition at line 58 of file interaction-tester.c.

{

}

Here is the caller graph for this function:

static void destroy ( GtkWidget *  widget,
gpointer  data 
) [static]

Definition at line 32 of file interaction-tester.c.

{
  gtk_main_quit ();
}

Here is the caller graph for this function:

static void handle_view_closed ( BamfMatcher *  matcher,
BamfView *  view,
gpointer  data 
) [static]

Definition at line 44 of file interaction-tester.c.

{
}

Here is the caller graph for this function:

static void handle_view_opened ( BamfMatcher *  matcher,
BamfView *  view,
gpointer  data 
) [static]

Definition at line 37 of file interaction-tester.c.

{
    return;
  
  
}

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 63 of file interaction-tester.c.

{
  gtk_init (&argc, &argv);

  matcher = bamf_matcher_get_default ();
  control = bamf_control_get_default ();

  bamf_control_insert_desktop_file (control, g_build_filename (g_get_current_dir (), "interact-test.desktop", NULL));

  g_signal_connect (G_OBJECT (matcher), "view-opened",
                   (GCallback) handle_view_opened, NULL);
  
  g_signal_connect (G_OBJECT (matcher), "view-closed",
                   (GCallback) handle_view_closed, NULL);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_wmclass (GTK_WINDOW (window), "interact-test", "interact-test");

  g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (destroy), NULL);
  
  g_timeout_add (5000, (GSourceFunc) begin_testing, NULL);

  gtk_main ();
  return 0;
}

Here is the call graph for this function:


Variable Documentation

BamfControl* control [static]

Definition at line 28 of file interaction-tester.c.

BamfMatcher* matcher [static]

Definition at line 27 of file interaction-tester.c.

GtkWidget* window [static]

Definition at line 26 of file interaction-tester.c.