ESPHome  2023.11.6
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::touchscreen::Touchscreen Class Reference

#include <touchscreen.h>

Inheritance diagram for esphome::touchscreen::Touchscreen:
esphome::ektf2232::EKTF2232Touchscreen esphome::lilygo_t5_47::LilygoT547Touchscreen esphome::tt21100::TT21100Touchscreen esphome::xpt2046::XPT2046Component

Public Member Functions

void set_display (display::Display *display)
 
display::Displayget_display () const
 
Trigger< TouchPoint > * get_touch_trigger ()
 
void register_listener (TouchListener *listener)
 

Protected Member Functions

void send_touch_ (TouchPoint tp)
 Call this function to send touch points to the on_touch listener and the binary_sensors. More...
 

Protected Attributes

uint16_t display_width_
 
uint16_t display_height_
 
display::Displaydisplay_
 
TouchRotation rotation_
 
Trigger< TouchPointtouch_trigger_
 
std::vector< TouchListener * > touch_listeners_
 

Detailed Description

Definition at line 32 of file touchscreen.h.

Member Function Documentation

◆ get_display()

display::Display* esphome::touchscreen::Touchscreen::get_display ( ) const
inline

Definition at line 35 of file touchscreen.h.

◆ get_touch_trigger()

Trigger<TouchPoint>* esphome::touchscreen::Touchscreen::get_touch_trigger ( )
inline

Definition at line 37 of file touchscreen.h.

◆ register_listener()

void esphome::touchscreen::Touchscreen::register_listener ( TouchListener listener)
inline

Definition at line 39 of file touchscreen.h.

◆ send_touch_()

void esphome::touchscreen::Touchscreen::send_touch_ ( TouchPoint  tp)
protected

Call this function to send touch points to the on_touch listener and the binary_sensors.

Definition at line 21 of file touchscreen.cpp.

◆ set_display()

void esphome::touchscreen::Touchscreen::set_display ( display::Display display)

Definition at line 10 of file touchscreen.cpp.

Field Documentation

◆ display_

display::Display* esphome::touchscreen::Touchscreen::display_
protected

Definition at line 47 of file touchscreen.h.

◆ display_height_

uint16_t esphome::touchscreen::Touchscreen::display_height_
protected

Definition at line 46 of file touchscreen.h.

◆ display_width_

uint16_t esphome::touchscreen::Touchscreen::display_width_
protected

Definition at line 45 of file touchscreen.h.

◆ rotation_

TouchRotation esphome::touchscreen::Touchscreen::rotation_
protected

Definition at line 48 of file touchscreen.h.

◆ touch_listeners_

std::vector<TouchListener *> esphome::touchscreen::Touchscreen::touch_listeners_
protected

Definition at line 50 of file touchscreen.h.

◆ touch_trigger_

Trigger<TouchPoint> esphome::touchscreen::Touchscreen::touch_trigger_
protected

Definition at line 49 of file touchscreen.h.


The documentation for this class was generated from the following files: