Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::PointerDataPacket Class Reference

#include <pointer_data_packet.h>

Public Member Functions

 PointerDataPacket (size_t count)
 
 PointerDataPacket (uint8_t *data, size_t num_bytes)
 
 ~PointerDataPacket ()
 
void SetPointerData (size_t i, const PointerData &data)
 
PointerData GetPointerData (size_t i) const
 
size_t GetLength () const
 
const std::vector< uint8_t > & data () const
 

Detailed Description

Definition at line 16 of file pointer_data_packet.h.

Constructor & Destructor Documentation

◆ PointerDataPacket() [1/2]

flutter::PointerDataPacket::PointerDataPacket ( size_t  count)
explicit

Definition at line 12 of file pointer_data_packet.cc.

13 : data_(count * sizeof(PointerData)) {}
int count
Definition: FontMgrTest.cpp:50

◆ PointerDataPacket() [2/2]

flutter::PointerDataPacket::PointerDataPacket ( uint8_t *  data,
size_t  num_bytes 
)

Definition at line 15 of file pointer_data_packet.cc.

16 : data_(data, data + num_bytes) {}
const std::vector< uint8_t > & data() const

◆ ~PointerDataPacket()

flutter::PointerDataPacket::~PointerDataPacket ( )
default

Member Function Documentation

◆ data()

const std::vector< uint8_t > & flutter::PointerDataPacket::data ( ) const
inline

Definition at line 25 of file pointer_data_packet.h.

25{ return data_; }

◆ GetLength()

size_t flutter::PointerDataPacket::GetLength ( ) const

Definition at line 32 of file pointer_data_packet.cc.

32 {
33 return data_.size() / sizeof(PointerData);
34}

◆ GetPointerData()

PointerData flutter::PointerDataPacket::GetPointerData ( size_t  i) const

Definition at line 25 of file pointer_data_packet.cc.

25 {
27 PointerData result;
28 memcpy(&result, &data_[i * sizeof(PointerData)], sizeof(PointerData));
29 return result;
30}
GAsyncResult * result
#define FML_DCHECK(condition)
Definition: logging.h:103

◆ SetPointerData()

void flutter::PointerDataPacket::SetPointerData ( size_t  i,
const PointerData data 
)

Definition at line 20 of file pointer_data_packet.cc.

20 {
22 memcpy(&data_[i * sizeof(PointerData)], &data, sizeof(PointerData));
23}

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