listeners.h File Reference

Deklares the functions and constants for the listeners. More...

#include "../jnilib.h"

Include dependency graph for listeners.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define CB_COMPONENT_HIDDEN   4
#define CB_COMPONENT_MOVED   2
#define CB_COMPONENT_RESIZED   1
#define CB_COMPONENT_SHOWN   3
#define CB_MOUSE_CLICKED   1
#define CB_MOUSE_ENTERED   4
#define CB_MOUSE_EXITED   5
#define CB_MOUSE_PRESSED   2
#define CB_MOUSE_RELEASED   3
#define CB_WINDOW_ACTIVATED   6
#define CB_WINDOW_CLOSED   3
#define CB_WINDOW_CLOSING   2
#define CB_WINDOW_DEACTIVATED   7
#define CB_WINDOW_DEICONIFIED   5
#define CB_WINDOW_ICONIFIED   4
#define CB_WINDOW_OPENED   1

Typedefs

typedef jobject ActionListener
typedef jobject Component
typedef jobject ComponentListener
typedef jobject ItemListener
typedef jobject MouseListener
typedef jobject Window
typedef jobject WindowListener

Functions

ActionListener addActionListener (jobject obj, void(*func)(Component))
 Adds an ActionListener for a Component to call back the specified function.
ComponentListener addComponentListener (jobject obj, void(*func)(jint, Component))
 Adds a ComponentListener for a Component to call back the specified function.
ItemListener addItemListener (jobject obj, void(*func)(Component, jboolean, const char *))
 Adds a ItemListener for a Component to call back the specified function.
MouseListener addMouseListener (jobject obj, void(*func)(jint, Component, jint, jint, jint, jint))
 Adds a MouseListener for a Component to call back the specified function.
WindowListener addWindowListener (jobject obj, void(*func)(jint, Window))
 Adds a WindowListener for a Window to call back the specified function.
void removeActionListener (jobject obj, ActionListener al)
 Removes an ActionListener from a Component and deletes the global reference to the ActionListener.
void removeComponentListener (jobject obj, ComponentListener cl)
 Removes a ComponentListener from a Component and deletes the global reference to the ComponentListener.
void removeItemListener (jobject obj, ItemListener il)
 Removes a ItemListener from a Component and deletes the global reference to the MouseListener.
void removeMouseListener (jobject obj, MouseListener ml)
 Removes a MouseListener from a Component and deletes the global reference to the MouseListener.
void removeWindowListener (jobject obj, WindowListener wl)
 Removes a WindowListener from a Window and deletes the global reference to the WindowListener.


Detailed Description

Deklares the functions and constants for the listeners.

In Java Listeners are objects which want to get informed about specific events. In this library callback functions where used to get informed about events. These functions allow to register the callback functions as listeners. The callback functions must have a certain signature depending on the event(s) you want to get informed about.

Author:
Stefan Gruber
Date:
01.02.2005

Definition in file listeners.h.


Define Documentation

#define CB_COMPONENT_HIDDEN   4
 

Definition at line 41 of file listeners.h.

#define CB_COMPONENT_MOVED   2
 

Definition at line 39 of file listeners.h.

#define CB_COMPONENT_RESIZED   1
 

Definition at line 38 of file listeners.h.

#define CB_COMPONENT_SHOWN   3
 

Definition at line 40 of file listeners.h.

#define CB_MOUSE_CLICKED   1
 

Definition at line 32 of file listeners.h.

#define CB_MOUSE_ENTERED   4
 

Definition at line 35 of file listeners.h.

#define CB_MOUSE_EXITED   5
 

Definition at line 36 of file listeners.h.

#define CB_MOUSE_PRESSED   2
 

Definition at line 33 of file listeners.h.

#define CB_MOUSE_RELEASED   3
 

Definition at line 34 of file listeners.h.

#define CB_WINDOW_ACTIVATED   6
 

Definition at line 29 of file listeners.h.

#define CB_WINDOW_CLOSED   3
 

Definition at line 26 of file listeners.h.

#define CB_WINDOW_CLOSING   2
 

Definition at line 25 of file listeners.h.

#define CB_WINDOW_DEACTIVATED   7
 

Definition at line 30 of file listeners.h.

#define CB_WINDOW_DEICONIFIED   5
 

Definition at line 28 of file listeners.h.

#define CB_WINDOW_ICONIFIED   4
 

Definition at line 27 of file listeners.h.

#define CB_WINDOW_OPENED   1
 

Definition at line 24 of file listeners.h.


Typedef Documentation

typedef jobject ActionListener
 

Definition at line 49 of file listeners.h.

typedef jobject Component
 

Definition at line 44 of file listeners.h.

typedef jobject ComponentListener
 

Definition at line 47 of file listeners.h.

typedef jobject ItemListener
 

Definition at line 50 of file listeners.h.

typedef jobject MouseListener
 

Definition at line 48 of file listeners.h.

typedef jobject Window
 

Definition at line 43 of file listeners.h.

typedef jobject WindowListener
 

Definition at line 46 of file listeners.h.


Function Documentation

ActionListener addActionListener jobject  obj,
void(*)(Component func
 

Adds an ActionListener for a Component to call back the specified function.

The parameters of the function pointer are:

  1. The component which caused the call.

Parameters:
obj - The Component to add the listener to.
func - The function to call back.
Returns:
the created ActionListener object.
See also:
removeActionListener(jobject obj, ActionListener al)

Definition at line 285 of file listeners.c.

ComponentListener addComponentListener jobject  obj,
void(*)(jint, Component func
 

Adds a ComponentListener for a Component to call back the specified function.

The parameters of the function pointer are:

  1. The event which caused the call (see defines starting with "CB_COMPONENT_").
  2. The component which caused the call.

Parameters:
obj - The Component to add the listener to.
func - The function to call back.
Returns:
the created ComponentListener object.
See also:
removeComponentListener(jobject obj, ComponentListener cl)

Definition at line 137 of file listeners.c.

ItemListener addItemListener jobject  obj,
void(*)(Component, jboolean, const char *)  func
 

Adds a ItemListener for a Component to call back the specified function.

The parameters of the function pointer are:

  1. The component which caused the call.
  2. The state of the item (selected or not).
  3. The item.

Parameters:
obj - The Component to add the listener to.
func - The function to call back.
Returns:
the created MouseListener object.
See also:
removeItemListener(jobject obj, ItemListener il)

Definition at line 359 of file listeners.c.

MouseListener addMouseListener jobject  obj,
void(*)(jint, Component, jint, jint, jint, jint)  func
 

Adds a MouseListener for a Component to call back the specified function.

The parameters of the function pointer are:

  1. The event which caused the call (see defines starting with "CB_MOUSE_").
  2. The component which caused the call.
  3. The X-Pos of the event.
  4. The Y-Pos of the event.
  5. The pressed mouse button.
  6. The number of times the user clicked.

Parameters:
obj - The Component to add the listener to.
func - The function to call back.
Returns:
the created MouseListener object.
See also:
removeMouseListener(jobject obj, MouseListener ml)

Definition at line 216 of file listeners.c.

WindowListener addWindowListener jobject  obj,
void(*)(jint, Window func
 

Adds a WindowListener for a Window to call back the specified function.

The parameters of the function pointer are:

  1. The event which caused the call (see defines starting with "CB_WINDOW_").
  2. The window which caused the call.

Parameters:
obj - The Window to add the listener to.
func - The function to call back.
Returns:
the created WindowListener object.
See also:
removeWindowListener(jobject obj, WindowListener wl)

Definition at line 66 of file listeners.c.

void removeActionListener jobject  obj,
ActionListener  al
 

Removes an ActionListener from a Component and deletes the global reference to the ActionListener.

Parameters:
obj - The Component to remove the listener from.
al - The ActionListener to remove.
See also:
addActionListener(jobject obj, void (*func)(Component))

Definition at line 318 of file listeners.c.

void removeComponentListener jobject  obj,
ComponentListener  cl
 

Removes a ComponentListener from a Component and deletes the global reference to the ComponentListener.

Parameters:
obj - The Component to remove the listener from.
cl - The ComponentListener to remove.
See also:
addComponentListener(jobject obj, void (*func)(jint, Component))

Definition at line 170 of file listeners.c.

void removeItemListener jobject  obj,
ItemListener  il
 

Removes a ItemListener from a Component and deletes the global reference to the MouseListener.

Parameters:
obj - The Component to remove the listener from.
il - The MouseListener to remove.
See also:
addItemListener(jobject obj, void (*func)(Component, jboolean, const char*))

Definition at line 392 of file listeners.c.

void removeMouseListener jobject  obj,
MouseListener  ml
 

Removes a MouseListener from a Component and deletes the global reference to the MouseListener.

Parameters:
obj - The Component to remove the listener from.
ml - The MouseListener to remove.
See also:
addMouseListener(jobject obj, void (*func)(jint, Component, jint, jint, jint, jint))

Definition at line 249 of file listeners.c.

void removeWindowListener jobject  obj,
WindowListener  wl
 

Removes a WindowListener from a Window and deletes the global reference to the WindowListener.

Parameters:
obj - The Window to remove the listener from.
wl - The WindowListener to remove.
See also:
addWindowListener(jobject obj, void (*func)(jint, Window))

Definition at line 99 of file listeners.c.


Generated on Sat Nov 19 14:11:14 2005 for GrubC by  doxygen 1.4.4