- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

Modules | Macros | Typedefs | Enumerations | Functions | Variables
Ecore_FB - Frame buffer convenience functions.
Ecore

Functions used to set up and shut down the Ecore_Framebuffer functions. More...

## Modules
| Framebuffer Calibration Functions
| Functions that calibrate the screen.

## Macros
#define | EV_CNT (EV_MAX+1)

## Typedefs
typedef struct _Ecore_Fb_Input_Device | Ecore_Fb_Input_Device
| Input device handler.
typedef enum _Ecore_Fb_Input_Device_Cap | Ecore_Fb_Input_Device_Cap
| Device capabilities.

## Enumerations
enum | _Ecore_Fb_Input_Device_Cap { ECORE_FB_INPUT_DEVICE_CAP_NONE = 0x00000000, ECORE_FB_INPUT_DEVICE_CAP_RELATIVE = 0x00000001, ECORE_FB_INPUT_DEVICE_CAP_ABSOLUTE = 0x00000002, ECORE_FB_INPUT_DEVICE_CAP_KEYS_OR_BUTTONS = 0x00000004 }
| Device capabilities.

## Functions
static void | nosigint (int val)
EAPI int | ecore_fb_init (const char *name)
| Initialize the Ecore_Fb library. More...
EAPI int | ecore_fb_shutdown (void)
| Shut down the Ecore_Fb library. More...
EAPI void | ecore_fb_size_get (int *w, int *h)
| Retrieve the width and height of the current frame buffer in pixels. More...
static void | _ecore_fb_size_get (int *w, int *h)
EAPI void | ecore_fb_callback_gain_set (void(*func)(void *data), void *data)
| Set a callback called when a virtual terminal is gained. More...
EAPI void | ecore_fb_callback_lose_set (void(*func)(void *data), void *data)
| Set a callback called when a virtual terminal is lost. More...
EAPI Ecore_Fb_Input_Device * | ecore_fb_input_device_open (const char *dev)
| Open an input device. More...
EAPI void | ecore_fb_input_device_close (Ecore_Fb_Input_Device *dev)
| Close the given device. More...
EAPI void | ecore_fb_input_device_listen (Ecore_Fb_Input_Device *dev, Eina_Bool listen)
| Set the listen mode for an input device . More...
EAPI const char * | ecore_fb_input_device_name_get (Ecore_Fb_Input_Device *dev)
| Retrieve the name of the given device. More...
EAPI Ecore_Fb_Input_Device_Cap | ecore_fb_input_device_cap_get (Ecore_Fb_Input_Device *dev)
| Retrieve the capability of the given device. More...
EAPI void | ecore_fb_input_device_axis_size_set (Ecore_Fb_Input_Device *dev, int w, int h)
| Set the axis size of the given device. More...
EAPI void | ecore_fb_input_threshold_click_set (Ecore_Fb_Input_Device *dev, double threshold)
EAPI double | ecore_fb_input_threshold_click_get (Ecore_Fb_Input_Device *dev)
EAPI void | ecore_fb_input_device_window_set (Ecore_Fb_Input_Device *dev, void *window)
| Associates an input device with the given Ecore_Evas wrapper/helper set of functions. More...
EAPI void | ecore_fb_touch_screen_calibrate_set (int xscale, int xtrans, int yscale, int ytrans, int xyswap)
| Calibrates the touschreen using the given parameters. More...
EAPI void | ecore_fb_touch_screen_calibrate_get (int *xscale, int *xtrans, int *yscale, int *ytrans, int *xyswap)
| Retrieves the calibration parameters of the touchscreen. More...
void | ecore_fb_input_device_threshold_click_set (Ecore_Fb_Input_Device *dev, double threshold)
| Set the threshold of mouse clicks of the given device. More...
double | ecore_fb_input_device_threshold_click_get (Ecore_Fb_Input_Device *dev)
| Get the threshold of mouse clicks of the given device. More...

## Variables
static sighandler_t | oldhand = NULL

## Detailed Description

Functions used to set up and shut down the Ecore_Framebuffer functions.

## Function Documentation

EAPI int ecore_fb_init | ( | const char * | name | ) |

Initialize the Ecore_Fb library.

Parameters

  name | Device target name.

Returns
  1 or greater on success, 0 on error.

This function sets up all the Ecore_Fb library. It returns 0 on failure, otherwise it returns the number of times it has already been called.

When Ecore_Fb is not used anymore, call ecore_fb_shutdown() to shut down the Ecore_Fb library.

EAPI int ecore_fb_shutdown | ( | void |  | ) |

Shut down the Ecore_Fb library.

Returns
  0 when the library is completely shut down, 1 or greater otherwise.

This function shuts down the Ecore_Fb library. It returns 0 when it has been called the same number of times than ecore_fb_init().

EAPI void ecore_fb_size_get | ( | int * | w,
|  | int * | h
| ) |  |

Retrieve the width and height of the current frame buffer in pixels.

Parameters

  w | Pointer to an integer in which to store the width.
  h | Pointer to an interge in which to store the height.

This function retrieves the size of the current frame buffer in pixels. `w` and `h` can be buffers that will be filled with the corresponding values. If one of them is `NULL`, nothing will be done for that parameter.

EAPI void ecore_fb_callback_gain_set | ( | void(*)(void *data) | func,
|  | void * | data
| ) |  |

Set a callback called when a virtual terminal is gained.

Parameters

  func | The callback called when vt is gained.
  data | The data to pass to the callback.

This function sets the callback `func` which will be called when a virtual terminal is gained (for example you press Ctrl-Alt-F1 to go to vt1 and your app was using vt1). `data` will be pass to `func` if the callback is called.

EAPI void ecore_fb_callback_lose_set | ( | void(*)(void *data) | func,
|  | void * | data
| ) |  |

Set a callback called when a virtual terminal is lost.

Parameters

  func | The callback called when vt is lost.
  data | The data to pass to the callback.

This function sets the callback `func` which will be called when a virtual terminal is lost (someone wants the vt from you and you want to give up that vt). `data` will be pass to `func` if the callback is called.

Ecore_Fb_Input_Device * ecore_fb_input_device_open | ( | const char * | dev | ) |

Open an input device.

Parameters

  dev | The device to open.

Returns
  The Ecore_Fb_Input_Device object that has been opened.

This function opens the input device named `dev` and returns the object for it, or returns `NULL` on failure.

References eina_list_append().

void ecore_fb_input_device_close | ( | Ecore_Fb_Input_Device * | dev | ) |

Close the given device.

Parameters

  dev | The device to close

This function closes the device `dev`. If `dev` is `NULL`, this function does nothing.

References eina_list_remove().

void ecore_fb_input_device_listen | ( | Ecore_Fb_Input_Device * | dev,
|  | Eina_Bool | listen
| ) |  |

Set the listen mode for an input device .

Parameters

  dev | The device to set the mode of.
  listen | `EINA_FALSE` to disable listening mode, `EINA_TRUE` to enable it.

This function enables or disables listening on the input device `dev`. If `listen` is `EINA_FALSE`, listening mode is disabled, if it is `EINA_TRUE`, it is enabled.

References ECORE_FD_READ, and ecore_main_fd_handler_add().

const char * ecore_fb_input_device_name_get | ( | Ecore_Fb_Input_Device * | dev | ) |

Retrieve the name of the given device.

Parameters

  dev | The device to get the name from.

Returns
  The name of the device.

This function returns the name of the device `dev`. If `dev` is `NULL`, this function returns `NULL`.

Ecore_Fb_Input_Device_Cap ecore_fb_input_device_cap_get | ( | Ecore_Fb_Input_Device * | dev | ) |

Retrieve the capability of the given device.

Parameters

  dev | The device to get the name from.

Returns
  The capability of the device.

This function returns the capability of the device `dev`. If `dev` is `NULL`, this function returns ECORE_FB_INPUT_DEVICE_CAP_NONE.

void ecore_fb_input_device_axis_size_set | ( | Ecore_Fb_Input_Device * | dev,
|  | int | w,
|  | int | h
| ) |  |

Set the axis size of the given device.

Parameters

  dev | The device to set the axis size to.
  w | The width of the axis.
  h | The height of the axis.

This function sets set the width `w` and height `h` of the axis of device `dev`. If `dev` is a relative input device, a width and height must set for it. If its absolute set the ioctl correctly, if not, unsupported device.

void ecore_fb_input_device_window_set | ( | Ecore_Fb_Input_Device * | dev,
|  | void * | window
| ) |  |

Associates an input device with the given Ecore_Evas wrapper/helper set of functions.

Parameters

  dev | The input being associated with an Ecore_Evas wrapper/helper set of functions (not `NULL`).
  window | The window which this input is being associated to. `NULL` will remove any previous association.

Events generated by this device will have a pointer to `window`. If this `window` is registered with ecore_event_window_register() or ecore_evas_input_event_register(), respective evas events will be delivered by the ecore_input_evas system. An example can be seen in the following code:

Ecore_Evas *ee = ecore_evas_new(NULL, 0, 0, 800, 600, NULL);
ecore_evas_input_event_register(ee);
device = ecore_fb_input_device_open(device_path);
if (device)
ecore_fb_input_device_window_set(device, ee);

On the previous code, all input captured on the mentioned device will be delivered to the `Ecore_Evas` `ee`.

Since
  1.1

EAPI void ecore_fb_touch_screen_calibrate_set | ( | int | xscale,
|  | int | xtrans,
|  | int | yscale,
|  | int | ytrans,
|  | int | xyswap
| ) |  |

Calibrates the touschreen using the given parameters.

Parameters

  xscale | X scaling, where 256 = 1.0
  xtrans | X translation.
  yscale | Y scaling.
  ytrans | Y translation.
  xyswap | Swap X & Y flag.

EAPI void ecore_fb_touch_screen_calibrate_get | ( | int * | xscale,
|  | int * | xtrans,
|  | int * | yscale,
|  | int * | ytrans,
|  | int * | xyswap
| ) |  |

Retrieves the calibration parameters of the touchscreen.

Parameters

  xscale | Pointer to an integer in which to store the X scaling. Note that 256 = 1.0.
  xtrans | Pointer to an integer in which to store the X translation.
  yscale | Pointer to an integer in which to store the Y scaling.
  ytrans | Pointer to an integer in which to store the Y translation.
  xyswap | Pointer to an integer in which to store the Swap X & Y flag.

void ecore_fb_input_device_threshold_click_set | ( | Ecore_Fb_Input_Device * | dev,
|  | double | threshold
| ) |  |

Set the threshold of mouse clicks of the given device.

Parameters

  dev | The device to set the threshodl mouse click to.
  threshold | The threshold value.

This function sets the threshold of mouse clicks of the device `dev` to `threshold`. If `dev` is `NULL`, this function does nothing.

double ecore_fb_input_device_threshold_click_get | ( | Ecore_Fb_Input_Device * | dev | ) |

Get the threshold of mouse clicks of the given device.

Parameters

  dev | The device to set the threshodl mouse click from.

Returns
  The threshold value.

This function returns the threshold of mouse clicks of the device `dev`. If `dev` is `NULL`, this function returns 0.0.