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="CategoryEvents.html" title="1
\82Â
\8fã">
\r
9 <title>SDL_DropEvent</title>
\r
12 <a href="index.html">
\96Ú
\8e\9f</a> - <a href="ApiByCategory.html">API(
\8b@
\94\
\95Ê)</a> - <a href="CategoryEvents.html">
\83C
\83x
\83\93\83g
\8f\88\97\9d</a> - SDL_DropEvent
\r
14 <h1>SDL_DropEvent</h1>
\r
15 \83h
\83\89\83b
\83O&
\83h
\83\8d\83b
\83v
\83C
\83x
\83\93\83g
\82Ì
\8fî
\95ñ
\82Ì
\8d\
\91¢
\91Ì
\r
16 <h2>
\83t
\83B
\81[
\83\8b\83h</h2>
\r
17 <table border="1" summary="SDL_DropEvent">
\r
18 <tr><td>Uint32</td><td>type</td><td>SDL_DROPFILE</td></tr>
\r
19 <tr><td>Uint32</td><td>timestamp</td><td>
\83C
\83x
\83\93\83g
\82Ì
\83^
\83C
\83\80\83X
\83^
\83\93\83v</td></tr>
\r
20 <tr><td>char*</td><td>file</td><td>
\83t
\83@
\83C
\83\8b\96¼ <a href="SDL_free.html">SDL_free()</a>
\82Å
\89ð
\95ú
\82·
\82é
\95K
\97v
\82ª
\82 \82é</td></tr>
\r
22 <h2>
\83T
\83\93\83v
\83\8b\83R
\81[
\83h</h2>
\r
25 //
\83T
\83\93\83v
\83\8b\83v
\83\8d\83O
\83\89\83\80:
\r
26 // SDL_DropEvent
\82Ì
\8eg
\82¢
\95û
\r
29 #include <stdio.h>
\r
31 int main(int argc, char *argv[]) {
\r
33 SDL_Event event; //
\83C
\83x
\83\93\83g
\83n
\83\93\83h
\83\8b\82Ì
\90é
\8c¾
\r
34 char* dropped_filedir; //
\83h
\83\8d\83b
\83v
\82³
\82ê
\82½
\83t
\83@
\83C
\83\8b\82Æ
\83f
\83B
\83\8c\83N
\83g
\83\8a\82Ö
\82Ì
\83|
\83C
\83\93\83^
\r
36 SDL_Init(SDL_INIT_VIDEO); // SDL2
\82ð
\8f\89\8aú
\89»
\82·
\82é
\r
38 window = SDL_CreateWindow( //
\83E
\83B
\83\93\83h
\83E
\82ð
\90¶
\90¬
\82·
\82é
\r
39 "SDL_DropEvent
\82Ì
\8eg
\82¢
\95û
\82±
\82Ì
\83E
\83B
\83\93\83h
\83E
\82É
\83t
\83@
\83C
\83\8b\82ð
\83h
\83\8d\83b
\83v
\82µ
\82Ä
\82
\82¾
\82³
\82¢",
\r
40 SDL_WINDOWPOS_CENTERED,
\r
41 SDL_WINDOWPOS_CENTERED,
\r
47 //
\83E
\83B
\83\93\83h
\83E
\82Ì
\90¶
\90¬
\82É
\90¬
\8c÷
\82µ
\82½
\82©
\83`
\83F
\83b
\83N
\82·
\82é
\r
48 if (window == NULL) {
\r
49 //
\83E
\83B
\83\93\83h
\83E
\82ª
\90¶
\90¬
\82³
\82ê
\82È
\82©
\82Á
\82½
\82Æ
\82«...
\r
50 printf("
\83E
\83B
\83\93\83h
\83E
\82ð
\90¶
\90¬
\82Å
\82«
\82È
\82©
\82Á
\82½: %s\n", SDL_GetError());
\r
54 for(;;) { //
\83v
\83\8d\83O
\83\89\83\80\83\8b\81[
\83v
\r
55 while (SDL_PollEvent(&event)) {
\r
56 switch (event.type) {
\r
57 case (SDL_QUIT): { //
\8fI
\97¹
\82Ì
\8fê
\8d\87\r
58 return 0; //
\8fI
\97¹
\8f\88\97\9d\82Í
\8fÈ
\97ª
\82·
\82é
\r
61 case (SDL_DROPFILE): { //
\83t
\83@
\83C
\83\8b\82ª
\83h
\83\8d\83b
\83v
\82³
\82ê
\82½
\82Æ
\82«
\r
62 dropped_filedir = event.drop.file;
\r
63 //
\83h
\83\8d\83b
\83v
\82³
\82ê
\82½
\83t
\83@
\83C
\83\8b\82Æ
\83f
\83B
\83\8c\83N
\83g
\83\8a\82ð
\95\
\8e¦
\82·
\82é
\r
64 SDL_ShowSimpleMessageBox(
\r
65 SDL_MESSAGEBOX_INFORMATION,
\r
66 "
\83E
\83B
\83\93\83h
\83E
\82É
\83h
\83\8d\83b
\83v
\82³
\82ê
\82½
\83t
\83@
\83C
\83\8b",
\r
70 SDL_free(dropped_filedir); // dropped_filedir
\82Ì
\83\81\83\82\83\8a\82ð
\89ð
\95ú
\82·
\82é
\r
78 SDL_DestroyWindow(window); //
\83E
\83B
\83\93\83h
\83E
\82ð
\95Â
\82¶
\82Ä
\94j
\8aü
\82·
\82é
\r
80 SDL_Quit(); //
\8fI
\97¹
\8f\88\97\9d\r
87 <a href="SDL_DropEvent.html">SDL_DropEvent</a>
\82Í<a href="SDL_Event.html">SDL_Event</a>
\82Ì
\83\81\83\93\83o
\82Å, type
\82ªSDL_DROPFILE
\82Ì
\82Æ
\82«
\95ñ
\8d\90\82³
\82ê
\82é.
\r
88 \83C
\83x
\83\93\83g
\82Ìdrop
\83t
\83B
\81[
\83\8b\83h
\82©
\82ç
\83A
\83N
\83Z
\83X
\82Å
\82«
\82é.
\r
91 \82±
\82Ì
\83C
\83x
\83\93\83g
\82Í
\83f
\83t
\83H
\83\8b\83g
\82Å
\82Í
\96³
\8cø
\82É
\82È
\82Á
\82Ä
\82¢
\82é.
\r
92 <a href="SDL_EventState.html">SDL_EventState()</a>
\82Å
\97L
\8cø
\82É
\82Å
\82«
\82é.
\r
95 \82à
\82µ
\82±
\82Ì
\83C
\83x
\83\93\83g
\82ð
\97L
\8cø
\82É
\82µ
\82½
\82È
\82ç
\82Î,
\83C
\83x
\83\93\83g
\82Ìfilename
\82Í
\89ð
\95ú
\82·
\82é
\95K
\97v
\82ª
\82 \82é.
\r
98 SDL
\83A
\83v
\83\8a\83P
\81[
\83V
\83\87\83\93\82Å
\83h
\83\89\83b
\83O&
\83h
\83\8d\83b
\83v
\82ð
\97L
\8cø
\82É
\82·
\82é
\82½
\82ß
\82É
\82Í,
\95K
\82¸info.plist
\83t
\83@
\83C
\83\8b\82à
\95Ò
\8fW
\82µ
\82È
\82¯
\82ê
\82Î
\82È
\82ç
\82È
\82¢.
\r
99 \97á
\82¦
\82Î,
\91S
\82Ä
\82Ì
\83h
\83L
\83\85\83\81\83\93\83g
\83^
\83C
\83v
\82Å
\97L
\8cø
\82É
\82·
\82é
\82½
\82ß
\82É
\82Í,
\83h
\83L
\83\85\83\81\83\93\83g
\83^
\83C
\83v
\82É "public.data" mime type
\82ð
\92Ç
\89Á
\82·
\82é
\95K
\97v
\82ª
\82 \82é.
\r
100 <h2>
\8aÖ
\98A
\8d\80\96Ú(
\97ñ
\8b\93\91Ì)</h2>
\r
101 <a href="SDL_EventType.html">SDL_EventType</a><br>
\r
102 <h2>
\8aÖ
\98A
\8d\80\96Ú(
\8d\
\91¢
\91Ì)</h2>
\r
103 <a href="SDL_Event.html">SDL_Event</a><br>
\r
104 <h2>
\8aÖ
\98A
\8d\80\96Ú(
\8aÖ
\90\94)</h2>
\r
105 <a href="SDL_EventState.html">SDL_EventState</a><br>
\r
106 <h2>SDL Wiki
\82Ö
\82Ì
\83\8a\83\93\83N</h2>
\r
107 <a href="https://wiki.libsdl.org/SDL_DropEvent">SDL_DropEvent - SDL Wiki</a><br>
\r