Browse Source

Use uint32_t for codepoint type in text events.

tags/v2.6.0
Andrew Belt 7 months ago
parent
commit
0ab12e7103
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      include/widget/Widget.hpp
  2. +1
    -1
      include/widget/event.hpp
  3. +1
    -1
      src/widget/event.cpp

+ 1
- 1
include/widget/Widget.hpp View File

@@ -299,7 +299,7 @@ struct Widget : WeakBase {
/** An event prototype with a Unicode character. */ /** An event prototype with a Unicode character. */
struct TextBaseEvent { struct TextBaseEvent {
/** Unicode code point of the character */ /** Unicode code point of the character */
int codepoint;
uint32_t codepoint;
}; };
/** Occurs when a character is typed while the mouse is hovering a Widget. /** Occurs when a character is typed while the mouse is hovering a Widget.
Recurses. Recurses.


+ 1
- 1
include/widget/event.hpp View File

@@ -148,7 +148,7 @@ struct EventState {
bool handleHover(math::Vec pos, math::Vec mouseDelta); bool handleHover(math::Vec pos, math::Vec mouseDelta);
bool handleLeave(); bool handleLeave();
bool handleScroll(math::Vec pos, math::Vec scrollDelta); bool handleScroll(math::Vec pos, math::Vec scrollDelta);
bool handleText(math::Vec pos, int codepoint);
bool handleText(math::Vec pos, uint32_t codepoint);
bool handleKey(math::Vec pos, int key, int scancode, int action, int mods); bool handleKey(math::Vec pos, int key, int scancode, int action, int mods);
bool handleDrop(math::Vec pos, const std::vector<std::string>& paths); bool handleDrop(math::Vec pos, const std::vector<std::string>& paths);
bool handleDirty(); bool handleDirty();


+ 1
- 1
src/widget/event.cpp View File

@@ -268,7 +268,7 @@ bool EventState::handleDrop(math::Vec pos, const std::vector<std::string>& paths
return !!cPathDrop.target; return !!cPathDrop.target;
} }


bool EventState::handleText(math::Vec pos, int codepoint) {
bool EventState::handleText(math::Vec pos, uint32_t codepoint) {
if (selectedWidget) { if (selectedWidget) {
// Dispatch SelectTextEvent // Dispatch SelectTextEvent
EventContext cSelectText; EventContext cSelectText;


Loading…
Cancel
Save