当前位置: 首页 > news >正文

青海网站制作多少钱公司网站不续费

青海网站制作多少钱,公司网站不续费,wordpress 投票,购物网站开发教程中文文章目录 事件相关的函数和数据结构用户自定义事件代码相关: 事件相关的函数和数据结构 SDL_WaitEvent :等待一个事件SDL_PushEvent 发送一个事件SDL_PumpEvents(): 将硬件设备产生的时间放入事件队列 ,用于读取事件,在调用该函数之前&#…

文章目录

    • 事件相关的函数和数据结构
      • 用户自定义事件
      • 代码相关:

事件相关的函数和数据结构

  • SDL_WaitEvent :等待一个事件
  • SDL_PushEvent 发送一个事件
  • SDL_PumpEvents(): 将硬件设备产生的时间放入事件队列 ,用于读取事件,在调用该函数之前,必须调用SDL_PumpEVents搜集键盘等事件
  • SDL_PeepEvents(): 从事件队列提取一个事件
    -数据结构 SDL_Event :代表一个事件

可以监控到的事件在SDL_events.h文件里面可以找到
在这里插入图片描述

用户自定义事件

#define FF_QUIT_EVENT (SDL_USEREVENT + 2) // 用户自定义事件
在这里插入图片描述

代码相关:

TEMPLATE = app
CONFIG += console thread
CONFIG -= app_bundle
CONFIG -= qtSOURCES += \main.cINCLUDEPATH += \$$PWD/../SDL2-2.0.10/include/LIBS += \$$PWD/../SDL2-2.0.10/lib/x86/SDL2.lib

main.c

#include <SDL.h>
#include <stdio.h>
#define FF_QUIT_EVENT (SDL_USEREVENT + 2) // 用户自定义事件
#undef main
int main(int argc, char *argv[]) {SDL_Window *window = NULL; // Declare a pointerSDL_Renderer *renderer = NULL;SDL_Init(SDL_INIT_VIDEO); // Initialize SDL2// Create an application window with the following settings:window = SDL_CreateWindow("An SDL2 window", // window titleSDL_WINDOWPOS_UNDEFINED, // initial x positionSDL_WINDOWPOS_UNDEFINED, // initial y position640, // width, in pixels480, // height, in pixelsSDL_WINDOW_SHOWN | SDL_WINDOW_BORDERLESS // flags - see below);// Check that the window was successfully createdif (window == NULL) {// In the case that the window could not be made...printf("Could not create window: %s\n", SDL_GetError());return 1;}/* We must call SDL_CreateRenderer in order for draw calls to affect this window. */renderer = SDL_CreateRenderer(window, -1, 0);/* Select the color for drawing. It is set to red here. */SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255);/* Clear the entire screen to our selected color. */SDL_RenderClear(renderer);/* Up until now everything was drawn behind the scenes.This will show the new, red contents of the window. */SDL_RenderPresent(renderer);SDL_Event event;int b_exit = 0;for (;;) {SDL_WaitEvent(&event);switch (event.type) {case SDL_KEYDOWN: /* 键盘事件 */switch (event.key.keysym.sym) {case SDLK_a:printf("key down a\n");break;case SDLK_s:printf("key down s\n");break;case SDLK_d:printf("key down d\n");break;case SDLK_q:printf("key down q and push quit event\n");SDL_Event event_q;event_q.type = FF_QUIT_EVENT;SDL_PushEvent(&event_q);break;default:printf("key down 0x%x\n", event.key.keysym.sym);break;}break;case SDL_MOUSEBUTTONDOWN: /* 鼠标按下事件 */if (event.button.button == SDL_BUTTON_LEFT) {printf("mouse down left\n");} else if (event.button.button == SDL_BUTTON_RIGHT) {printf("mouse down right\n");} else {printf("mouse down %d\n", event.button.button);}break;case SDL_MOUSEMOTION: /* 鼠标移动事件 */printf("mouse movie (%d,%d)\n", event.button.x, event.button.y);break;case FF_QUIT_EVENT://如果是收到自定义的退出信号 则退出接受事件的循环printf("receive quit event\n");b_exit = 1;break;}if (b_exit)break;}// destory rendererif (renderer)SDL_DestroyRenderer(renderer);// Close and destroy the windowif (window)SDL_DestroyWindow(window);// Clean upSDL_Quit();return 0;
}
http://www.yayakq.cn/news/991166/

相关文章:

  • 网站黑色代码货源一件代发从哪里找
  • 做外贸网站需要营业执照物流查询网站开发
  • 提供零基础网站建设教学培训无锡网站关键词优化
  • 做视频添加字幕的网站模板建站和仿站
  • 做gif网站西宁市公司网站建设
  • 手机访问能否提高网站权重哪个网站可以接广告做
  • wordpress免费网站模板下载查找邮箱注册过的网站
  • 开发网站有什么用dokuwiki wordpress
  • 网站关键词排名下降互联网之光博览会
  • wordpress删除图片青岛 网站优化
  • 网站如何做电脑和手机软件互联网营销案例
  • 网站如何做引流东莞seo培训
  • 做抽奖网站违法吗郑州做网站和app的公司
  • 火狐 开发者 网站公司网站上传文章
  • 购物帮做特惠的导购网站秦皇岛网站制作 微商城建设
  • 冠县做网站推广互联网政务服务平台
  • 旅游管理网站业务模块济南seo网站建设
  • 惠州网站设计培训专业建设质量报告
  • 建网站视频wordpress规则
  • 0网站建设公司宣传册wordpress英文字体样式
  • 太原seo外包服务淘宝seo搜索优化
  • 商务网站制作工程师成都科技网站建设电话多少
  • 深圳制作网站公司中国诚乡建设部网站
  • 沈阳市营商环境建设监督局网站建设工程合同有哪些种类
  • 做网站灵宝狍与女人做爰网站
  • wordpress目录分站比较有名的网站建设公司
  • 在哪个网站做一照一码宝安区建设网站
  • 网站添加悬浮二维码上海网站建设 s
  • 网站建设表格便民平台推广怎么做
  • 网站建设get你装饰网站建设专家