1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
\r
4 <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
\r
5 <meta http-equiv="Content-Style-Type" content="text/css">
\r
6 <meta name="keywords" content="Simple Directmedia Layer SDL2.0">
\r
7 <link rel="top" href="index.html" title="
\83z
\81[
\83\80">
\r
8 <link rel="parent" href="CategoryVideo.html" title="1
\82Â
\8fã">
\r
9 <title>SDL_SetWindowTitle</title>
\r
12 <a href="index.html">
\96Ú
\8e\9f</a> - <a href="ApiByCategory.html">API(
\8b@
\94\
\95Ê)</a> - <a href="CategoryVideo.html">
\83f
\83B
\83X
\83v
\83\8c\83C
\82Æ
\83E
\83B
\83\93\83h
\83E</a> - SDL_SetWindowTitle
\r
14 <h1>SDL_SetWindowTitle</h1>
\r
15 \83E
\83B
\83\93\83h
\83E
\82Ì
\83^
\83C
\83g
\83\8b\82ð
\90Ý
\92è
\82·
\82é
\r
17 <code>void SDL_SetWindowTitle(SDL_Window* window, const char* title)</code>
\r
19 <table border="1" summary="SDL_SetWindowTitle">
\r
20 <tr><td>window</td><td>
\90Ý
\92è
\82·
\82é
\83E
\83B
\83\93\83h
\83E</td></tr>
\r
21 <tr><td>title</td><td>
\83E
\83B
\83\93\83h
\83E
\82Ì
\83^
\83C
\83g
\83\8b\82ÌUTF-8
\95¶
\8e\9a\97ñ</td></tr>
\r
23 <h2>
\83T
\83\93\83v
\83\8b\83R
\81[
\83h</h2>
\r
27 //
\83E
\83B
\83\93\83h
\83E
\82Ì
\83^
\83C
\83g
\83\8b\82ð
\93®
\93I
\82É
\90Ý
\92è
\82·
\82é
\r
31 int main(int argc, char* argv[]){
\r
36 const char *titles[] = { //
\82½
\82¾
\82Ì
\82¨
\97V
\82Ñ
\82Å
\82 \82é. marquee
\83^
\83O
\82Ì
\82æ
\82¤
\82É
\83A
\83j
\83\81\81[
\83V
\83\87\83\93\82³
\82¹
\82Ä
\83\86\81[
\83U
\82ð
\83C
\83\89\82Â
\82©
\82¹
\82æ
\82¤
\r
37 "t", "thi", "this w", "this win", "this windo", "this window's", "this window's ti", "this window's title",
\r
38 "chis window's title is", "chih window's title is ", "chih wandnw's title is ", "c h wandnw'g title is ",
\r
39 "c h a nw'g titln is ", "c h a n g i n ig ", "c h a n g i n g!", "",
\r
40 "c h a n g i n g!", "", "c h a n g i n g!", "c h a n g i n g!"
\r
43 SDL_Init(SDL_INIT_VIDEO); // SDL2
\82ð
\8f\89\8aú
\89»
\82·
\82é
\r
45 //
\83E
\83B
\83\93\83h
\83E
\82ð
\90¶
\90¬
\82·
\82é
\r
46 window = SDL_CreateWindow(
\r
47 "This will surely be overwritten", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 320, 240, SDL_WINDOW_RESIZABLE
\r
50 //
\83\81\83C
\83\93\83\8b\81[
\83v
\82É
\93ü
\82é.
\89½
\82©
\83L
\81[
\82ð
\89\9f\82·
\82©X
\82ð
\83N
\83\8a\83b
\83N
\82·
\82é
\82Æ
\8fI
\97¹
\82·
\82é
\r
51 for( ; e.type!=SDL_QUIT&&e.type!=SDL_KEYDOWN; SDL_PollEvent(&e)){
\r
52 static int i = 0, t = 0;
\r
54 if(!(++t%9)){ // 9
\83t
\83\8c\81[
\83\80\82²
\82Æ
\82É...
\r
55 SDL_SetWindowTitle(window, titles[i]); //
\83\8b\81[
\83v
\82Å
\r
56 if(++i >= sizeof(titles)/sizeof(titles[0])) i = 0; //
\83^
\83C
\83g
\83\8b\82Ì
\94z
\97ñ
\82ð
\92Ê
\82é
\r
63 SDL_DestroyWindow(window);
\r
71 <h2>
\8aÖ
\98A
\8d\80\96Ú(
\8aÖ
\90\94)</h2>
\r
72 <a href="SDL_GetWindowTitle.html">SDL_GetWindowTitle</a><br>
\r
73 <h2>SDL Wiki
\82Ö
\82Ì
\83\8a\83\93\83N</h2>
\r
74 <a href="https://wiki.libsdl.org/SDL_SetWindowTitle">SDL_SetWindowTitle - SDL Wiki</a>
\r