CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 11:58:47 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=f4ee809ca7280c84a6a4705f324330717010a9c5df46851a8047083dcca4894ba%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22o13FzbGBKrCTy7nXfP5xpCGP-fIqMhix%22%3B%7D; HttpOnly; Path=/
cf-ray: 98ce30080e958e4d-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
-
⭐✅ MAKE $2500 IN 15 MIN⭐⭐⭐ S
JavaScript | 4 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ✅ NEVER SEEN...
JavaScript | 12 sec ago | 0.24 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 21 sec ago | 0.24 KB
-
✅⭐ Make $2500 in 15 minutes ✅ NEVER SEEN BEFO...
JavaScript | 30 sec ago | 0.24 KB
-
⭐⭐Exchange Exploit⭐⭐ Y
JavaScript | 34 sec ago | 0.24 KB
-
⭐✅ Trading Profit Method ✅ NEVER SEEN BEFORE...
JavaScript | 42 sec ago | 0.24 KB
-
⭐⭐⭐Make $1500 in 20 minutes⭐⭐
Java | 43 sec ago | 0.10 KB
-
✅⭐ Make huge profits on trading ⭐⭐ 6
JavaScript | 45 sec ago | 0.24 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