Editor: zoom (Ctrl+roda, pinca), selecao de texto e partes do bloco moveis
- Area de scripts com zoom: Ctrl+roda no ponteiro, roda rola na vertical e Shift+roda na horizontal; pinca com dois dedos (toque) e pinca do touchpad (XInput 2.4 no X11, GFX_IN_ZOOM). Desenho em escala 1 escalado depois (rb_scale_from); a arvore acessivel acompanha (tb_a11y_scale_from). - SDL2: cache de fontes com 64 tamanhos e descarte do menos usado (antes vazava uma fonte por chamada depois de 8 tamanhos). - Campos de texto e editor de codigo: cursor em qualquer posicao, selecao (mouse, Shift+setas, clique duplo), Ctrl+A/C/X/V; no toque, segurar seleciona a palavra com alcas e barra Recortar/Copiar/Colar/Tudo. - "Criar um Bloco": o nome e uma parte movel (PARAM_NAME) e pode ser apagado quando um rotulo logo depois assume; hexagono booleano sem corte. - Harness: cenarios 32-34 (zoom, pinca, dialogo, selecao e clipboard). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a6f834f88e
commit
f180eaf75a
9 files changed
+1287
-209
No files matched your search
@@ -176,6 +176,9 @@ TB_API void tb_a11y_set_name (TinyBlocks_A11yTree* tree, int node, const c
|
||||
TB_API void tb_a11y_set_key (TinyBlocks_A11yTree* tree, int node, const char* key);
|
||||
/* Ponto onde as acoes agem (o centro pode cair num filho) */
|
||||
TB_API void tb_a11y_set_point (TinyBlocks_A11yTree* tree, int node, float x, float y);
|
||||
/* Escala os nos a partir de `first` (ate o ultimo criado) em torno de (ox, oy):
|
||||
* conteudo desenhado com zoom (ex.: a area de scripts) */
|
||||
TB_API void tb_a11y_scale_from (TinyBlocks_A11yTree* tree, int first, float ox, float oy, float s);
|
||||
/* Aviso para o narrador ler (mensagens de status, erros) */
|
||||
TB_API void tb_a11y_announce(TinyBlocks_A11yTree* tree, const char* text);
|
||||
|
||||
|
||||
@@ -199,6 +199,16 @@ void tb_a11y_set_point(TinyBlocks_A11yTree* t, int node, float x, float y) {
|
||||
t->nodes[node].py = y;
|
||||
}
|
||||
|
||||
void tb_a11y_scale_from(TinyBlocks_A11yTree* t, int first, float ox, float oy, float s) {
|
||||
if (!t || first < 0) return;
|
||||
for (int i = first; i < t->n; i++) {
|
||||
TinyBlocks_A11yNode* nd = &t->nodes[i];
|
||||
nd->x = ox + (nd->x - ox) * s; nd->y = oy + (nd->y - oy) * s;
|
||||
nd->px = ox + (nd->px - ox) * s; nd->py = oy + (nd->py - oy) * s;
|
||||
nd->w *= s; nd->h *= s;
|
||||
}
|
||||
}
|
||||
|
||||
void tb_a11y_announce(TinyBlocks_A11yTree* t, const char* text) {
|
||||
if (!t || !text || !text[0] || t->announce_n >= 8) return;
|
||||
scopy(t->announce[t->announce_n++], TB_A11Y_DESC_MAX, text);
|
||||
|
||||
@@ -78,7 +78,8 @@ typedef struct {
|
||||
} TbBpTab;
|
||||
|
||||
/* -- Blocos compostos (protótipo) --- */
|
||||
typedef enum { TB_BP_PARAM_NUM, TB_BP_PARAM_BOOL, TB_BP_PARAM_LABEL } TbBpParamKind;
|
||||
typedef enum { TB_BP_PARAM_NUM, TB_BP_PARAM_BOOL, TB_BP_PARAM_LABEL,
|
||||
TB_BP_PARAM_NAME /* posicao do nome (sem ela: na frente) */ } TbBpParamKind;
|
||||
typedef struct { TbBpParamKind kind; char name[32]; } TbBpParam;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -275,6 +275,7 @@ static const Col COL_CODE_BG TB_EW_UNUSED = C( 40, 44, 52);
|
||||
static const Col COL_CODE_GUTTER TB_EW_UNUSED = C( 33, 37, 43);
|
||||
static const Col COL_CODE_CURLINE TB_EW_UNUSED = C( 51, 57, 67);
|
||||
static const Col COL_CODE_FOCUS TB_EW_UNUSED = C( 62, 74, 53);
|
||||
static const Col COL_CODE_SEL TB_EW_UNUSED = C( 38, 79,120); /* selecao no editor de codigo */
|
||||
static const Col COL_CODE_BAR TB_EW_UNUSED = C( 33, 37, 43);
|
||||
static const Col COL_CODE_TEXT TB_EW_UNUSED = C(212, 212, 212);
|
||||
static const Col COL_TIP_BG TB_EW_UNUSED = C( 37, 37, 38);
|
||||
@@ -597,6 +598,7 @@ typedef struct Tab {
|
||||
int top_cap;
|
||||
int top_n;
|
||||
float ws_sx, ws_sy;
|
||||
float ws_zoom; /* escala da area de scripts (0 = 100%) */
|
||||
char name[48];
|
||||
bool is_composite;
|
||||
int comp_id;
|
||||
@@ -608,6 +610,8 @@ typedef struct Tab {
|
||||
char* code_text;
|
||||
int code_len, code_cap;
|
||||
int code_caret; /* posicao do cursor (offset em bytes) */
|
||||
int code_anchor; /* outra ponta da selecao (= caret: sem selecao) */
|
||||
bool code_drag; /* mouse estendendo a selecao */
|
||||
int code_scroll; /* primeira linha visivel (0-based) */
|
||||
int code_focus; /* linha destacada (1-based), -1 = nenhuma */
|
||||
char code_path[256];
|
||||
@@ -644,7 +648,8 @@ typedef struct Tab {
|
||||
int group_n;
|
||||
} Tab;
|
||||
|
||||
typedef enum { PARAM_NUM, PARAM_BOOL, PARAM_LABEL } ParamKind;
|
||||
/* PARAM_NAME marca onde o nome do bloco aparece; sem ela, o nome vai na frente */
|
||||
typedef enum { PARAM_NUM, PARAM_BOOL, PARAM_LABEL, PARAM_NAME } ParamKind;
|
||||
|
||||
typedef struct { ParamKind kind; char name[32]; } UserParam;
|
||||
|
||||
@@ -820,14 +825,13 @@ typedef struct Ed {
|
||||
int comp_dialog_def; /* -1 = novo; senão índice em user_blocks */
|
||||
bool comp_dialog_in_tab; /* novo bloco: chapéu "defina" na aba atual */
|
||||
bool comp_dialog_editing; /* true = edição de nome/rótulo em andamento */
|
||||
int comp_dialog_edit_part; /* índice da parte em edição, -1 = nome do bloco */
|
||||
int comp_dialog_edit_part; /* índice da parte em edição (a PARAM_NAME edita o nome) */
|
||||
char comp_dialog_name[48];
|
||||
UserParam comp_dialog_parts[MAX_UBLK_PARTS];
|
||||
UserParam comp_dialog_parts[MAX_UBLK_PARTS + 1]; /* + a PARAM_NAME */
|
||||
int comp_dialog_part_n;
|
||||
int comp_dialog_sel; /* parte selecionada (-1 = nenhuma) */
|
||||
int comp_dialog_color;
|
||||
float comp_dialog_geom[MAX_UBLK_PARTS][2]; /* x,w desenhados (para hit test) */
|
||||
float comp_dialog_name_x, comp_dialog_name_w;
|
||||
float comp_dialog_geom[MAX_UBLK_PARTS + 1][2]; /* x,w desenhados (para hit test) */
|
||||
|
||||
bool ctx_menu_open;
|
||||
bool ctx_export; /* menu de contexto aberto e o de exportacao */
|
||||
@@ -862,6 +866,8 @@ typedef struct Ed {
|
||||
SnapKind snap_kind;
|
||||
int snap_bi, snap_idx;
|
||||
float pan_mx, pan_my, pan_sx, pan_sy;
|
||||
bool pinch; /* dois dedos na area de scripts: zoom */
|
||||
float pinch_d0, pinch_z0, pinch_wx, pinch_wy;
|
||||
|
||||
bool editing;
|
||||
int edit_bi, edit_in;
|
||||
@@ -1034,8 +1040,38 @@ typedef struct Ed {
|
||||
|
||||
/* Servidor MCP: agentes leem e editam as pilhas por ferramentas */
|
||||
struct TbMcpServer* mcp;
|
||||
|
||||
/* Edicao de texto (te_*): o campo em edicao tem cursor e selecao; o
|
||||
editor de codigo tem os dele (code_caret/code_anchor). Alcas e barra
|
||||
de acoes (toque) servem aos dois (te_owner). */
|
||||
unsigned frame_no, draw_no; /* quadros (entrada) e desenhos da principal */
|
||||
bool key_shift, key_ctrl; /* modificadores da tecla/clique atual */
|
||||
char* te_buf; /* campo ligado (NULL = nenhum) */
|
||||
size_t te_cap;
|
||||
bool te_multi; /* aceita quebra de linha */
|
||||
int te_caret, te_anchor; /* selecao = entre os dois (bytes) */
|
||||
unsigned te_frame, te_draw_frame; /* ultimo uso (quadro) / desenho (draw_no) */
|
||||
float te_x, te_y, te_lh, te_fs; /* desenho: x do texto, centro da 1a linha */
|
||||
bool te_ws; /* desenhado na area de scripts (zoom) */
|
||||
bool ws_drawing; /* desenhando a area de scripts agora */
|
||||
int te_owner; /* TE_FIELD / TE_CODE */
|
||||
bool te_drag; /* mouse estendendo a selecao */
|
||||
bool te_handles; /* toque: alcas + barra de acoes */
|
||||
int te_handle_drag; /* alca arrastada (0 = inicio, 1 = fim) */
|
||||
bool te_press; /* dedo apertou no texto (segurar = palavra) */
|
||||
bool te_eat_up; /* o soltar deste toque ja foi tratado */
|
||||
int te_press_owner;
|
||||
float te_press_x, te_press_y;
|
||||
unsigned te_press_t;
|
||||
unsigned te_click_t; /* clique duplo = palavra */
|
||||
float te_click_x, te_click_y;
|
||||
bool te_hvis; /* alcas desenhadas neste quadro */
|
||||
float te_hx[2], te_hy[2]; /* ponta de cima de cada alca (tela) */
|
||||
float te_bar_x, te_bar_y, te_bar_w; /* barra Recortar/Copiar/Colar/Tudo */
|
||||
} Ed;
|
||||
|
||||
enum { TE_NONE, TE_FIELD, TE_CODE };
|
||||
|
||||
static inline TinyBlocks_A11yTree* ed_ax(Ed* ed) { return ed->ax_on ? ed->ax_tree : NULL; }
|
||||
|
||||
#define CT (ed->tabs[ed->cur_tab])
|
||||
@@ -1049,6 +1085,13 @@ void bubble_clear(Ed* ed);
|
||||
void palette_rebuild(Ed* ed);
|
||||
void utf8_pop(char* s);
|
||||
void append_text(char* dst, size_t cap, const char* add);
|
||||
/* Campo de texto em edicao (cursor, selecao, Ctrl+A/C/X/V): as teclas e o
|
||||
texto vao para te_key/te_insert e quem desenha chama te_draw depois do
|
||||
texto (x = inicio do texto, cy = centro da 1a linha, lh = altura da linha) */
|
||||
bool te_key(Ed* ed, char* buf, size_t cap, int sc, bool multi);
|
||||
void te_insert(Ed* ed, char* buf, size_t cap, const char* s, bool multi);
|
||||
void te_draw(Ed* ed, TinyBlocks_RenderableBlock* rb, char* buf, size_t cap, bool multi,
|
||||
float x, float cy, float lh, float fs, Col caret);
|
||||
void dlg_open(Ed* ed, int def_idx);
|
||||
void dlg_render(Ed* ed, TinyBlocks_RenderableBlock* rb);
|
||||
bool dlg_click(Ed* ed, float mx, float my);
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -82,7 +82,9 @@ enum {
|
||||
#define GFX_IN_MOUSE_IN 25 /* int: 1 se o mouse está sobre esta janela */
|
||||
#define GFX_IN_GMOUSE_X 26 /* real: mouse na tela (global), x */
|
||||
#define GFX_IN_GMOUSE_Y 27 /* real: mouse na tela (global), y */
|
||||
#define GFX_IN_COUNT 28
|
||||
#define GFX_IN_ZOOM 28 /* real: pinça do touchpad neste frame (fator; *
|
||||
* 0 = nenhuma, >1 aproxima) */
|
||||
#define GFX_IN_COUNT 29
|
||||
|
||||
#define GFX_MAX_TOUCHES 10
|
||||
|
||||
@@ -107,6 +109,7 @@ typedef struct TinyBlocks_GfxInput {
|
||||
int win_x, win_y; /* posicao da janela na tela */
|
||||
int mouse_in; /* o mouse esta sobre esta janela */
|
||||
float gmouse_x, gmouse_y; /* mouse na tela (coordenadas globais) */
|
||||
float zoom; /* pinca do touchpad: fator (0 = nenhuma) */
|
||||
} TinyBlocks_GfxInput;
|
||||
|
||||
/* -- Contrato de um backend gráfico --- */
|
||||
|
||||
@@ -187,6 +187,7 @@ static const TinyBlocks_SlotDesc s_input_outs[GFX_IN_COUNT] = {
|
||||
{"win_x", TB_VALUE_INTEGER}, {"win_y", TB_VALUE_INTEGER},
|
||||
{"mouse_in", TB_VALUE_INTEGER},
|
||||
{"gmouse_x", TB_VALUE_REAL}, {"gmouse_y", TB_VALUE_REAL},
|
||||
{"zoom", TB_VALUE_REAL},
|
||||
};
|
||||
|
||||
static void eval_input(TinyBlocks_Block* self, TinyBlocks* rt) {
|
||||
@@ -279,6 +280,7 @@ static void input_push(TinyBlocks_Block* b, const TinyBlocks_GfxInput* in) {
|
||||
SET(GFX_IN_MOUSE_IN, tb_value_integer(in->mouse_in));
|
||||
SET(GFX_IN_GMOUSE_X, tb_value_real(in->gmouse_x));
|
||||
SET(GFX_IN_GMOUSE_Y, tb_value_real(in->gmouse_y));
|
||||
SET(GFX_IN_ZOOM, tb_value_real(in->zoom));
|
||||
#undef SET
|
||||
b->dirty = false;
|
||||
}
|
||||
|
||||
@@ -76,10 +76,10 @@ static void eval_handle_noop(TinyBlocks_Block* self, TinyBlocks* rt) {
|
||||
/* ===
|
||||
* Fonte TTF - cache por tamanho
|
||||
* === */
|
||||
#define FONT_CACHE_CAP 8
|
||||
#define FONT_CACHE_CAP 64 /* o zoom da area de scripts pede muitos tamanhos */
|
||||
#define FONT_SEARCH_COUNT 9
|
||||
|
||||
typedef struct { int size; TTF_Font* font; } FontEntry;
|
||||
typedef struct { int size; TTF_Font* font; unsigned used; } FontEntry;
|
||||
|
||||
static FontEntry s_font_cache[FONT_CACHE_CAP];
|
||||
static int s_font_cache_n = 0;
|
||||
@@ -114,18 +114,27 @@ static TTF_Font* bundled_font(int size) {
|
||||
}
|
||||
|
||||
static TTF_Font* get_font(int size) {
|
||||
static unsigned tick = 0;
|
||||
tick++;
|
||||
for (int i = 0; i < s_font_cache_n; i++)
|
||||
if (s_font_cache[i].size == size) return s_font_cache[i].font;
|
||||
if (s_font_cache[i].size == size) { s_font_cache[i].used = tick; return s_font_cache[i].font; }
|
||||
|
||||
TTF_Font* f = bundled_font(size);
|
||||
for (int i = 0; i < FONT_SEARCH_COUNT && !f; i++)
|
||||
f = TTF_OpenFont(s_font_paths[i], size);
|
||||
if (!f) return NULL;
|
||||
|
||||
if (f && s_font_cache_n < FONT_CACHE_CAP) {
|
||||
s_font_cache[s_font_cache_n].size = size;
|
||||
s_font_cache[s_font_cache_n].font = f;
|
||||
s_font_cache_n++;
|
||||
}
|
||||
/* cheio: fecha o usado ha mais tempo (antes vazava uma fonte por chamada) */
|
||||
int slot = s_font_cache_n;
|
||||
if (slot >= FONT_CACHE_CAP) {
|
||||
slot = 0;
|
||||
for (int i = 1; i < FONT_CACHE_CAP; i++)
|
||||
if (s_font_cache[i].used < s_font_cache[slot].used) slot = i;
|
||||
TTF_CloseFont(s_font_cache[slot].font);
|
||||
} else s_font_cache_n++;
|
||||
s_font_cache[slot].size = size;
|
||||
s_font_cache[slot].font = f;
|
||||
s_font_cache[slot].used = tick;
|
||||
return f;
|
||||
}
|
||||
|
||||
@@ -456,12 +465,104 @@ typedef struct SdlWin {
|
||||
Uint32 id;
|
||||
TinyBlocks_GfxInput in;
|
||||
int pos_fresh; /* posicao do mouse veio de um evento neste quadro */
|
||||
unsigned long xwin; /* janela X11 (0 fora do X11) */
|
||||
float pinch_acc; /* pinca do touchpad acumulada (fator; 0 = nenhuma) */
|
||||
float pinch_last; /* escala do gesto no evento anterior */
|
||||
struct SdlWin* next;
|
||||
} SdlWin;
|
||||
|
||||
static SdlWin* s_wins = NULL;
|
||||
static bool s_be_inited = false;
|
||||
|
||||
/* ===
|
||||
* Pinca do touchpad no X11: o SDL2 nao repassa os gestos do XInput 2.4, entao
|
||||
* a janela os pede (XISelectEvents) e um observador de eventos le o
|
||||
* SDL_SYSWMEVENT enquanto o cookie ainda tem os dados. libXi/libX11 vem por
|
||||
* dlopen (o SDL ja os carregou); sem eles, ou fora do X11, nada muda.
|
||||
* === */
|
||||
#if defined(__linux__) && !defined(__ANDROID__) && defined(__has_include)
|
||||
#if __has_include(<X11/extensions/XInput2.h>)
|
||||
#define TB_XI_GESTURES 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef TB_XI_GESTURES
|
||||
#include <dlfcn.h>
|
||||
#include <SDL2/SDL_syswm.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/XInput2.h>
|
||||
|
||||
static int s_xi_state = 0; /* 0 = nao tentado, 1 = ok, -1 = indisponivel */
|
||||
static int s_xi_opcode = 0;
|
||||
static int (*p_XISelectEvents)(Display*, Window, XIEventMask*, int);
|
||||
|
||||
static int SDLCALL xi_watch(void* user, SDL_Event* e) {
|
||||
(void)user;
|
||||
if (e->type != SDL_SYSWMEVENT || !e->syswm.msg || e->syswm.msg->subsystem != SDL_SYSWM_X11) return 1;
|
||||
XGenericEventCookie* ck = &e->syswm.msg->msg.x11.event.xcookie;
|
||||
if (ck->type != GenericEvent || ck->extension != s_xi_opcode || !ck->data) return 1;
|
||||
if (ck->evtype < XI_GesturePinchBegin || ck->evtype > XI_GesturePinchEnd) return 1;
|
||||
const XIGesturePinchEvent* g = (const XIGesturePinchEvent*)ck->data;
|
||||
for (SdlWin* w = s_wins; w; w = w->next) {
|
||||
if (w->xwin != (unsigned long)g->event) continue;
|
||||
if (ck->evtype == XI_GesturePinchBegin) { w->pinch_last = 1.f; break; }
|
||||
float sc = (float)g->scale;
|
||||
if (sc > 0.f && w->pinch_last > 0.f) {
|
||||
w->pinch_acc = (w->pinch_acc > 0.f ? w->pinch_acc : 1.f) * (sc / w->pinch_last);
|
||||
w->pinch_last = sc;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* dlsym -> ponteiro de funcao sem cast fora do padrao */
|
||||
static void sym_fn(void* dst, void* lib, const char* name) {
|
||||
void* p = dlsym(lib, name);
|
||||
memcpy(dst, &p, sizeof(p));
|
||||
}
|
||||
|
||||
static bool xi_init(Display* dpy) {
|
||||
if (s_xi_state) return s_xi_state > 0;
|
||||
s_xi_state = -1;
|
||||
void* xi = dlopen("libXi.so.6", RTLD_NOW | RTLD_LOCAL);
|
||||
void* x11 = dlopen("libX11.so.6", RTLD_NOW | RTLD_LOCAL);
|
||||
if (!xi || !x11) return false;
|
||||
Bool (*q_ext)(Display*, const char*, int*, int*, int*);
|
||||
Status (*q_ver)(Display*, int*, int*);
|
||||
sym_fn(&q_ext, x11, "XQueryExtension");
|
||||
sym_fn(&q_ver, xi, "XIQueryVersion");
|
||||
sym_fn(&p_XISelectEvents, xi, "XISelectEvents");
|
||||
int ev, err, major = 2, minor = 4;
|
||||
if (!q_ext || !q_ver || !p_XISelectEvents) return false;
|
||||
if (!q_ext(dpy, "XInputExtension", &s_xi_opcode, &ev, &err)) return false;
|
||||
if (q_ver(dpy, &major, &minor) != Success || major < 2 || (major == 2 && minor < 4)) return false;
|
||||
SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);
|
||||
SDL_AddEventWatch(xi_watch, NULL);
|
||||
s_xi_state = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Pede os gestos de pinca na janela. A mascara substitui a que o SDL pos
|
||||
(toque), entao os eventos de toque vao junto. */
|
||||
static void xi_select(SdlWin* sw) {
|
||||
SDL_SysWMinfo info;
|
||||
SDL_VERSION(&info.version);
|
||||
if (!SDL_GetWindowWMInfo(sw->win, &info) || info.subsystem != SDL_SYSWM_X11) return;
|
||||
Display* dpy = info.info.x11.display;
|
||||
if (!xi_init(dpy)) return;
|
||||
unsigned char bits[XIMaskLen(XI_GesturePinchEnd)] = {0};
|
||||
XISetMask(bits, XI_TouchBegin); XISetMask(bits, XI_TouchUpdate); XISetMask(bits, XI_TouchEnd);
|
||||
XISetMask(bits, XI_GesturePinchBegin); XISetMask(bits, XI_GesturePinchUpdate);
|
||||
XISetMask(bits, XI_GesturePinchEnd);
|
||||
XIEventMask m = { XIAllMasterDevices, (int)sizeof(bits), bits };
|
||||
p_XISelectEvents(dpy, info.info.x11.window, &m, 1);
|
||||
sw->xwin = (unsigned long)info.info.x11.window;
|
||||
}
|
||||
#else
|
||||
static void xi_select(SdlWin* sw) { (void)sw; }
|
||||
#endif
|
||||
|
||||
static int map_key(SDL_Scancode sc) {
|
||||
if (sc >= SDL_SCANCODE_A && sc <= SDL_SCANCODE_Z) return TB_KEY_A + (sc - SDL_SCANCODE_A);
|
||||
if (sc >= SDL_SCANCODE_1 && sc <= SDL_SCANCODE_9) return TB_KEY_0 + 1 + (sc - SDL_SCANCODE_1);
|
||||
@@ -578,6 +679,7 @@ static void* be_window_open(const char* title, int w, int h) {
|
||||
sw->in.win_w = w; sw->in.win_h = h;
|
||||
sw->next = s_wins;
|
||||
s_wins = sw;
|
||||
xi_select(sw);
|
||||
return sw;
|
||||
}
|
||||
|
||||
@@ -676,6 +778,10 @@ static void be_poll(void) {
|
||||
while (!s_has_pending && SDL_PollEvent(&ev)) {
|
||||
if (!be_apply(&ev)) { s_pending = ev; s_has_pending = true; }
|
||||
}
|
||||
for (SdlWin* w = s_wins; w; w = w->next) { /* pinca do touchpad (xi_watch) */
|
||||
w->in.zoom = w->pinch_acc;
|
||||
w->pinch_acc = 0.f;
|
||||
}
|
||||
|
||||
/* Dispositivo: teclas seguradas (janela com o foco do teclado), dedos na
|
||||
tela e sensores (todas as janelas) */
|
||||
|
||||
Reference in new issue
Block a user