CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 08:03:56 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=066d00b44abc263a414bbe4bea6e68550bf9bd3de60ebf0286b9241902a16b94a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22N_k0_Vo5JADFJkst4b3QNumB3qes97NE%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d515632faf4e3d-BLR
MyWindow.mm - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // MyWindow.mm
- #import <Cocoa/Cocoa.h> // Importando o framework Cocoa
- #include "MyWindow.hpp" // Incluindo o cabeçalho da classe
- // Implementação da classe MyWindow
- MyWindow::MyWindow() {
- // Construtor vazio, aqui você pode inicializar membros, se necessário
- }
- MyWindow::~MyWindow() {
- // Destruidor, pode limpar recursos se necessário
- }
- void MyWindow::run() {
- // Criando a janela usando Cocoa
- @autoreleasepool {
- // Criar uma instância da aplicação
- NSApplication *app = [NSApplication sharedApplication];
- // Criar uma janela
- NSWindow *window = [[NSWindow alloc]
- initWithContentRect:NSMakeRect(0, 0, 800, 600)
- styleMask:(NSWindowStyleMaskTitled |
- NSWindowStyleMaskClosable |
- NSWindowStyleMaskResizable)
- backing:NSBackingStoreBuffered
- defer:NO];
- [window setTitle:@"Minha Janela"];
- [window makeKeyAndOrderFront:nil];
- // Instalação do evento de monitoramento do mouse e teclado
- [window setAcceptsMouseMovedEvents:YES]; // Aceita eventos de movimento de mouse
- // Lógica para tratar eventos (mouse e teclado)
- while (![app isRunning]) {
- NSEvent *event = [app nextEventMatchingMask:NSEventMaskAny untilDate:nil inMode:NSDefaultRunLoopMode dequeue:YES];
- [app sendEvent:event];
- [app updateWindows];
- // Checando tipo de evento (mouse ou teclado)
- if ([event type] == NSEventTypeKeyDown) {
- NSString *keyPressed = [event charactersIgnoringModifiers];
- std::cout << "Tecla pressionada: " << [keyPressed UTF8String] << std::endl;
- }
- if ([event type] == NSEventTypeMouseMoved) {
- NSPoint mouseLocation = [event locationInWindow];
- std::cout << "Mouse movido para: (" << mouseLocation.x << ", " << mouseLocation.y << ")" << std::endl;
- }
- if ([event type] == NSEventTypeLeftMouseDown) {
- NSPoint mouseDownLocation = [event locationInWindow];
- std::cout << "Clique do mouse em: (" << mouseDownLocation.x << ", " << mouseDownLocation.y << ")" << std::endl;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
📌 Swapzone +37% glitch ⭐ P
JavaScript | 1 sec ago | 0.25 KB
-
⭐⭐⭐Exchange Exploit⭐⭐
Java | 5 sec ago | 0.10 KB
-
✅⭐ Make huge profits on trading ⭐⭐ R
JavaScript | 9 sec ago | 0.25 KB
-
⭐⭐⭐Exchange Exploit T I⭐⭐
Java | 16 sec ago | 0.10 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 19 sec ago | 0.25 KB
-
⭐⭐⭐Profit Method⭐⭐
Java | 27 sec ago | 0.10 KB
-
⭐⭐⭐ChangeNOW Exploit⭐⭐
Java | 39 sec ago | 0.10 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ L
JavaScript | 44 sec ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand