From d043151de56130880165e83a85b3e8e2dce35193 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Wed, 7 Dec 2011 10:46:01 +0100 Subject: [wx] Add callback specs to wx_object --- lib/wx/src/wx_object.erl | 51 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 10 deletions(-) (limited to 'lib/wx') diff --git a/lib/wx/src/wx_object.erl b/lib/wx/src/wx_object.erl index bc85cd93d4..80f8937656 100644 --- a/lib/wx/src/wx_object.erl +++ b/lib/wx/src/wx_object.erl @@ -108,7 +108,38 @@ get_pid/1 ]). --export([behaviour_info/1]). +%% -export([behaviour_info/1]). +-callback init(Args :: term()) -> + {#wx_ref{}, State :: term()} | {#wx_ref{}, State :: term(), timeout() | hibernate} | + {stop, Reason :: term()} | ignore. +-callback handle_event(Request :: #wx{}, State :: term()) -> + {noreply, NewState :: term()} | + {noreply, NewState :: term(), timeout() | hibernate} | + {stop, Reason :: term(), NewState :: term()}. +-callback handle_call(Request :: term(), From :: {pid(), Tag :: term()}, + State :: term()) -> + {reply, Reply :: term(), NewState :: term()} | + {reply, Reply :: term(), NewState :: term(), timeout() | hibernate} | + {noreply, NewState :: term()} | + {noreply, NewState :: term(), timeout() | hibernate} | + {stop, Reason :: term(), Reply :: term(), NewState :: term()} | + {stop, Reason :: term(), NewState :: term()}. +-callback handle_cast(Request :: term(), State :: term()) -> + {noreply, NewState :: term()} | + {noreply, NewState :: term(), timeout() | hibernate} | + {stop, Reason :: term(), NewState :: term()}. +-callback handle_info(Info :: timeout() | term(), State :: term()) -> + {noreply, NewState :: term()} | + {noreply, NewState :: term(), timeout() | hibernate} | + {stop, Reason :: term(), NewState :: term()}. +-callback terminate(Reason :: (normal | shutdown | {shutdown, term()} | + term()), + State :: term()) -> + term(). +-callback code_change(OldVsn :: (term() | {down, term()}), State :: term(), + Extra :: term()) -> + {ok, NewState :: term()} | {error, Reason :: term()}. + %% System exports -export([system_continue/3, @@ -125,15 +156,15 @@ %%% API %%%========================================================================= %% @hidden -behaviour_info(callbacks) -> - [{init,1}, - {handle_call,3}, - {handle_info,2}, - {handle_event,2}, - {terminate,2}, - {code_change,3}]; -behaviour_info(_Other) -> - undefined. +%% behaviour_info(callbacks) -> +%% [{init,1}, +%% {handle_call,3}, +%% {handle_info,2}, +%% {handle_event,2}, +%% {terminate,2}, +%% {code_change,3}]; +%% behaviour_info(_Other) -> +%% undefined. %% ----------------------------------------------------------------- -- cgit v1.2.3 From ebb2a4c2e9e01d59d8074bcda5c97f2c3b200d76 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Wed, 7 Dec 2011 12:36:28 +0100 Subject: [wx] Remove warnings Add an additional cast when casting buffer offsets, to remove warnings "cast to pointer from integer of different size" --- lib/wx/api_gen/gl_gen_c.erl | 4 +- lib/wx/c_src/gen/gl_funcs.cpp | 86 +++++++++++++++++++++---------------------- 2 files changed, 45 insertions(+), 45 deletions(-) (limited to 'lib/wx') diff --git a/lib/wx/api_gen/gl_gen_c.erl b/lib/wx/api_gen/gl_gen_c.erl index 0f5cb0e1f4..be2c5cf2bf 100644 --- a/lib/wx/api_gen/gl_gen_c.erl +++ b/lib/wx/api_gen/gl_gen_c.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2010. All Rights Reserved. +%% Copyright Ericsson AB 2008-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -238,7 +238,7 @@ decode_arg(P=#arg{name=Name,type=#type{size=BSz,name=Type,single={list,TSz}}},A0 {P, A}; decode_arg(P=#arg{name=Name,type=#type{name=Type,base=guard_int}},A0) -> A = align(4,A0), - w(" ~s *~s = (~s *) * (int *) bp; bp += 4;~n", [Type,Name,Type]), + w(" ~s *~s = (~s *) (ErlDrvSInt) * (int *) bp; bp += 4;~n", [Type,Name,Type]), {P, A}; decode_arg(P=#arg{name=Name,type=#type{name=Type,base=string,single=true}},A0) -> w(" ~s *~s = (~s *) bp;~n", [Type,Name,Type]), diff --git a/lib/wx/c_src/gen/gl_funcs.cpp b/lib/wx/c_src/gen/gl_funcs.cpp index 30542a0f02..fa1476dba5 100644 --- a/lib/wx/c_src/gen/gl_funcs.cpp +++ b/lib/wx/c_src/gen/gl_funcs.cpp @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2008-2010. All Rights Reserved. + * Copyright Ericsson AB 2008-2011. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in @@ -395,7 +395,7 @@ case 5043: { // glBitmap GLfloat *yorig = (GLfloat *) bp; bp += 4; GLfloat *xmove = (GLfloat *) bp; bp += 4; GLfloat *ymove = (GLfloat *) bp; bp += 4; - GLubyte *bitmap = (GLubyte *) * (int *) bp; bp += 4; + GLubyte *bitmap = (GLubyte *) (ErlDrvSInt) * (int *) bp; bp += 4; weglBitmap(*width,*height,*xorig,*yorig,*xmove,*ymove,bitmap); }; break; case 5044: { // glBitmap @@ -538,7 +538,7 @@ case 5073: { // glColorPointer GLint *size = (GLint *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglColorPointer(*size,*type,*stride,pointer); }; break; case 5074: { // glColorPointer @@ -646,7 +646,7 @@ case 5090: { // glDrawElements GLenum *mode = (GLenum *) bp; bp += 4; GLsizei *count = (GLsizei *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *indices = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *indices = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglDrawElements(*mode,*count,*type,indices); }; break; case 5091: { // glDrawElements @@ -661,7 +661,7 @@ case 5092: { // glDrawPixels GLsizei *height = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglDrawPixels(*width,*height,*format,*type,pixels); }; break; case 5093: { // glDrawPixels @@ -678,7 +678,7 @@ case 5094: { // glEdgeFlagv }; break; case 5095: { // glEdgeFlagPointer GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglEdgeFlagPointer(*stride,pointer); }; break; case 5096: { // glEdgeFlagPointer @@ -1265,7 +1265,7 @@ case 5149: { // glIndexMask case 5150: { // glIndexPointer GLenum *type = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglIndexPointer(*type,*stride,pointer); }; break; case 5151: { // glIndexPointer @@ -1300,7 +1300,7 @@ case 5157: { // glInitNames case 5158: { // glInterleavedArrays GLenum *format = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglInterleavedArrays(*format,*stride,pointer); }; break; case 5159: { // glInterleavedArrays @@ -1561,7 +1561,7 @@ case 5199: { // glNormal3sv case 5200: { // glNormalPointer GLenum *type = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglNormalPointer(*type,*stride,pointer); }; break; case 5201: { // glNormalPointer @@ -1933,7 +1933,7 @@ case 5274: { // glTexCoordPointer GLint *size = (GLint *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglTexCoordPointer(*size,*type,*stride,pointer); }; break; case 5275: { // glTexCoordPointer @@ -2016,7 +2016,7 @@ case 5286: { // glTexImage1D GLint *border = (GLint *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglTexImage1D(*target,*level,*internalformat,*width,*border,*format,*type,pixels); }; break; case 5287: { // glTexImage1D @@ -2039,7 +2039,7 @@ case 5288: { // glTexImage2D GLint *border = (GLint *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglTexImage2D(*target,*level,*internalformat,*width,*height,*border,*format,*type,pixels); }; break; case 5289: { // glTexImage2D @@ -2087,7 +2087,7 @@ case 5294: { // glTexSubImage1D GLsizei *width = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglTexSubImage1D(*target,*level,*xoffset,*width,*format,*type,pixels); }; break; case 5295: { // glTexSubImage1D @@ -2109,7 +2109,7 @@ case 5296: { // glTexSubImage2D GLsizei *height = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglTexSubImage2D(*target,*level,*xoffset,*yoffset,*width,*height,*format,*type,pixels); }; break; case 5297: { // glTexSubImage2D @@ -2188,7 +2188,7 @@ case 5312: { // glVertexPointer GLint *size = (GLint *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglVertexPointer(*size,*type,*stride,pointer); }; break; case 5313: { // glVertexPointer @@ -2222,7 +2222,7 @@ case 5317: { // glDrawRangeElements GLuint *end = (GLuint *) bp; bp += 4; GLsizei *count = (GLsizei *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *indices = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *indices = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglDrawRangeElements(*mode,*start,*end,*count,*type,indices); }; break; case 5318: { // glDrawRangeElements @@ -2244,7 +2244,7 @@ case 5319: { // glTexImage3D GLint *border = (GLint *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglTexImage3D(*target,*level,*internalformat,*width,*height,*depth,*border,*format,*type,pixels); }; break; case 5320: { // glTexImage3D @@ -2271,7 +2271,7 @@ case 5321: { // glTexSubImage3D GLsizei *depth = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglTexSubImage3D(*target,*level,*xoffset,*yoffset,*zoffset,*width,*height,*depth,*format,*type,pixels); }; break; case 5322: { // glTexSubImage3D @@ -2306,7 +2306,7 @@ case 5324: { // glColorTable GLsizei *width = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *table = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *table = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglColorTable(*target,*internalformat,*width,*format,*type,table); }; break; case 5325: { // glColorTable @@ -2389,7 +2389,7 @@ case 5332: { // glColorSubTable GLsizei *count = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *data = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *data = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglColorSubTable(*target,*start,*count,*format,*type,data); }; break; case 5333: { // glColorSubTable @@ -2415,7 +2415,7 @@ case 5335: { // glConvolutionFilter1D GLsizei *width = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *image = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *image = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglConvolutionFilter1D(*target,*internalformat,*width,*format,*type,image); }; break; case 5336: { // glConvolutionFilter1D @@ -2434,7 +2434,7 @@ case 5337: { // glConvolutionFilter2D GLsizei *height = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *image = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *image = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglConvolutionFilter2D(*target,*internalformat,*width,*height,*format,*type,image); }; break; case 5338: { // glConvolutionFilter2D @@ -2530,8 +2530,8 @@ case 5346: { // glSeparableFilter2D GLsizei *height = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *row = (GLvoid *) * (int *) bp; bp += 4; - GLvoid *column = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *row = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; + GLvoid *column = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglSeparableFilter2D(*target,*internalformat,*width,*height,*format,*type,row,column); }; break; case 5347: { // glSeparableFilter2D @@ -2666,7 +2666,7 @@ case 5360: { // glCompressedTexImage3D GLsizei *depth = (GLsizei *) bp; bp += 4; GLint *border = (GLint *) bp; bp += 4; GLsizei *imageSize = (GLsizei *) bp; bp += 4; - GLvoid *data = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *data = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglCompressedTexImage3D(*target,*level,*internalformat,*width,*height,*depth,*border,*imageSize,data); }; break; case 5361: { // glCompressedTexImage3D @@ -2689,7 +2689,7 @@ case 5362: { // glCompressedTexImage2D GLsizei *height = (GLsizei *) bp; bp += 4; GLint *border = (GLint *) bp; bp += 4; GLsizei *imageSize = (GLsizei *) bp; bp += 4; - GLvoid *data = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *data = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglCompressedTexImage2D(*target,*level,*internalformat,*width,*height,*border,*imageSize,data); }; break; case 5363: { // glCompressedTexImage2D @@ -2710,7 +2710,7 @@ case 5364: { // glCompressedTexImage1D GLsizei *width = (GLsizei *) bp; bp += 4; GLint *border = (GLint *) bp; bp += 4; GLsizei *imageSize = (GLsizei *) bp; bp += 4; - GLvoid *data = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *data = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglCompressedTexImage1D(*target,*level,*internalformat,*width,*border,*imageSize,data); }; break; case 5365: { // glCompressedTexImage1D @@ -2734,7 +2734,7 @@ case 5366: { // glCompressedTexSubImage3D GLsizei *depth = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLsizei *imageSize = (GLsizei *) bp; bp += 4; - GLvoid *data = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *data = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglCompressedTexSubImage3D(*target,*level,*xoffset,*yoffset,*zoffset,*width,*height,*depth,*format,*imageSize,data); }; break; case 5367: { // glCompressedTexSubImage3D @@ -2760,7 +2760,7 @@ case 5368: { // glCompressedTexSubImage2D GLsizei *height = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLsizei *imageSize = (GLsizei *) bp; bp += 4; - GLvoid *data = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *data = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglCompressedTexSubImage2D(*target,*level,*xoffset,*yoffset,*width,*height,*format,*imageSize,data); }; break; case 5369: { // glCompressedTexSubImage2D @@ -2782,7 +2782,7 @@ case 5370: { // glCompressedTexSubImage1D GLsizei *width = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLsizei *imageSize = (GLsizei *) bp; bp += 4; - GLvoid *data = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *data = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglCompressedTexSubImage1D(*target,*level,*xoffset,*width,*format,*imageSize,data); }; break; case 5371: { // glCompressedTexSubImage1D @@ -2958,7 +2958,7 @@ case 5401: { // glFogCoorddv case 5402: { // glFogCoordPointer GLenum *type = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglFogCoordPointer(*type,*stride,pointer); }; break; case 5403: { // glFogCoordPointer @@ -3003,7 +3003,7 @@ case 5412: { // glSecondaryColorPointer GLint *size = (GLint *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglSecondaryColorPointer(*size,*type,*stride,pointer); }; break; case 5413: { // glSecondaryColorPointer @@ -3156,7 +3156,7 @@ case 5434: { // glBufferData GLenum *target = (GLenum *) bp; bp += 4; bp += 4; GLsizeiptr size = (GLsizeiptr) * (GLuint64EXT *) bp; bp += 8; - GLvoid *data = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *data = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; GLenum *usage = (GLenum *) bp; bp += 4; weglBufferData(*target,size,data,*usage); }; break; @@ -3173,7 +3173,7 @@ case 5436: { // glBufferSubData bp += 4; GLintptr offset = (GLintptr) * (GLuint64EXT *) bp; bp += 8; GLsizeiptr size = (GLsizeiptr) * (GLuint64EXT *) bp; bp += 8; - GLvoid *data = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *data = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglBufferSubData(*target,offset,size,data); }; break; case 5437: { // glBufferSubData @@ -3833,7 +3833,7 @@ case 5518: { // glVertexAttribPointer GLboolean *normalized = (GLboolean *) bp; bp += 1; bp += 3; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglVertexAttribPointer(*index,*size,*type,*normalized,*stride,pointer); }; break; case 5519: { // glVertexAttribPointer @@ -4051,7 +4051,7 @@ case 5541: { // glVertexAttribIPointer GLint *size = (GLint *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglVertexAttribIPointer(*index,*size,*type,*stride,pointer); }; break; case 5542: { // glVertexAttribIPointer @@ -4345,7 +4345,7 @@ case 5578: { // glDrawElementsInstanced GLenum *mode = (GLenum *) bp; bp += 4; GLsizei *count = (GLsizei *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *indices = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *indices = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; GLsizei *primcount = (GLsizei *) bp; bp += 4; weglDrawElementsInstanced(*mode,*count,*type,indices,*primcount); }; break; @@ -5341,7 +5341,7 @@ case 5683: { // glDrawElementsBaseVertex GLenum *mode = (GLenum *) bp; bp += 4; GLsizei *count = (GLsizei *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *indices = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *indices = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; GLint *basevertex = (GLint *) bp; bp += 4; weglDrawElementsBaseVertex(*mode,*count,*type,indices,*basevertex); }; break; @@ -5359,7 +5359,7 @@ case 5685: { // glDrawRangeElementsBaseVertex GLuint *end = (GLuint *) bp; bp += 4; GLsizei *count = (GLsizei *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *indices = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *indices = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; GLint *basevertex = (GLint *) bp; bp += 4; weglDrawRangeElementsBaseVertex(*mode,*start,*end,*count,*type,indices,*basevertex); }; break; @@ -5377,7 +5377,7 @@ case 5687: { // glDrawElementsInstancedBaseVertex GLenum *mode = (GLenum *) bp; bp += 4; GLsizei *count = (GLsizei *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *indices = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *indices = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; GLsizei *primcount = (GLsizei *) bp; bp += 4; GLint *basevertex = (GLint *) bp; bp += 4; weglDrawElementsInstancedBaseVertex(*mode,*count,*type,indices,*primcount,*basevertex); @@ -5772,7 +5772,7 @@ case 5725: { // glGetQueryObjectui64v }; break; case 5726: { // glDrawArraysIndirect GLenum *mode = (GLenum *) bp; bp += 4; - GLvoid *indirect = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *indirect = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglDrawArraysIndirect(*mode,indirect); }; break; case 5727: { // glDrawArraysIndirect @@ -5783,7 +5783,7 @@ case 5727: { // glDrawArraysIndirect case 5728: { // glDrawElementsIndirect GLenum *mode = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *indirect = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *indirect = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglDrawElementsIndirect(*mode,*type,indirect); }; break; case 5729: { // glDrawElementsIndirect @@ -6718,7 +6718,7 @@ case 5840: { // glVertexAttribLPointer GLint *size = (GLint *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) * (int *) bp; bp += 4; + GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; weglVertexAttribLPointer(*index,*size,*type,*stride,pointer); }; break; case 5841: { // glVertexAttribLPointer -- cgit v1.2.3 From 7fdc3f2f145c0b2f4785b5efec522218d0080cf6 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Wed, 7 Dec 2011 13:13:22 +0100 Subject: [wx] Avoid missing wx_object behaviour warning Copy wx_object to bootstrap compiler --- lib/wx/Makefile | 22 +++++++++++++++------- lib/wx/src/Makefile | 16 ++++++++++++++-- 2 files changed, 29 insertions(+), 9 deletions(-) (limited to 'lib/wx') diff --git a/lib/wx/Makefile b/lib/wx/Makefile index 0bc89e08ad..9a75b2e36e 100644 --- a/lib/wx/Makefile +++ b/lib/wx/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2008-2010. All Rights Reserved. +# Copyright Ericsson AB 2008-2011. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in @@ -18,12 +18,19 @@ # include ./vsn.mk -include ./config.mk -SUBDIRS = src -ifeq ($(CAN_BUILD_DRIVER), true) -SUBDIRS += c_src -endif -SUBDIRS += examples doc/src + +ifdef TERTIARY_BOOTSTRAP + INSIDE_ERLSRC = true + SUBDIRS = src +else # Normal build + include ./config.mk + SUBDIRS = src + ifeq ($(CAN_BUILD_DRIVER), true) + SUBDIRS += c_src + endif + SUBDIRS += examples doc/src +endif #TERTIARY_BOOTSTRAP + CLEANDIRS = $(SUBDIRS) api_gen ifeq ($(INSIDE_ERLSRC),true) @@ -32,6 +39,7 @@ ifeq ($(INSIDE_ERLSRC),true) # Default Subdir Targets # ---------------------------------------------------- SUB_DIRECTORIES=$(SUBDIRS) + include $(ERL_TOP)/make/otp_subdir.mk else # we are building standalone wxErlang diff --git a/lib/wx/src/Makefile b/lib/wx/src/Makefile index 46bc06271c..4e5971de03 100644 --- a/lib/wx/src/Makefile +++ b/lib/wx/src/Makefile @@ -18,7 +18,15 @@ # include ../vsn.mk -include ../config.mk +ifdef TERTIARY_BOOTSTRAP + VSN = $(WX_VSN) + INSIDE_ERLSRC = true + include $(ERL_TOP)/make/target.mk + include $(ERL_TOP)/make/$(TARGET)/otp.mk + RELSYSDIR = $(RELEASE_PATH)/lib/wx-$(VSN) +else # Normal build + include ../config.mk +endif ESRC = . EGEN = gen @@ -65,7 +73,11 @@ APPUP_SRC = $(APPUP_FILE).src APPUP_TARGET = $(EBIN)/$(APPUP_FILE) # Targets -debug opt: $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) +ifdef TERTIARY_BOOTSTRAP + opt: $(EBIN)/wx_object.beam +else + debug opt: $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) +endif clean: rm -f $(TARGET_FILES) -- cgit v1.2.3 From 44d21ab66987c4dc4df461901600618efd2907c3 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Wed, 7 Dec 2011 15:13:24 +0100 Subject: [wx] Add handle_cast to avoid behaviour warning --- lib/wx/examples/demo/demo.erl | 8 ++++++-- lib/wx/examples/demo/ex_aui.erl | 8 ++++++-- lib/wx/examples/demo/ex_button.erl | 8 ++++++-- lib/wx/examples/demo/ex_canvas.erl | 8 ++++++-- lib/wx/examples/demo/ex_canvas_paint.erl | 8 ++++++-- lib/wx/examples/demo/ex_choices.erl | 8 ++++++-- lib/wx/examples/demo/ex_cursor.erl | 8 ++++++-- lib/wx/examples/demo/ex_dialogs.erl | 8 ++++++-- lib/wx/examples/demo/ex_frame_utils.erl | 8 ++++++-- lib/wx/examples/demo/ex_gauge.erl | 8 ++++++-- lib/wx/examples/demo/ex_gl.erl | 8 ++++++-- lib/wx/examples/demo/ex_graphicsContext.erl | 8 ++++++-- lib/wx/examples/demo/ex_grid.erl | 8 ++++++-- lib/wx/examples/demo/ex_htmlWindow.erl | 8 ++++++-- lib/wx/examples/demo/ex_listCtrl.erl | 7 ++++++- lib/wx/examples/demo/ex_notebook.erl | 9 +++++++-- lib/wx/examples/demo/ex_pickers.erl | 9 +++++++-- lib/wx/examples/demo/ex_popupMenu.erl | 9 +++++++-- lib/wx/examples/demo/ex_radioBox.erl | 7 +++++-- lib/wx/examples/demo/ex_sashWindow.erl | 8 ++++++-- lib/wx/examples/demo/ex_sizers.erl | 8 ++++++-- lib/wx/examples/demo/ex_slider.erl | 8 ++++++-- lib/wx/examples/demo/ex_splitterWindow.erl | 8 ++++++-- lib/wx/examples/demo/ex_static.erl | 8 ++++++-- lib/wx/examples/demo/ex_textCtrl.erl | 8 ++++++-- lib/wx/examples/demo/ex_treeCtrl.erl | 8 ++++++-- lib/wx/examples/sudoku/sudoku_board.erl | 8 ++++++-- lib/wx/examples/sudoku/sudoku_gui.erl | 8 ++++++-- 28 files changed, 170 insertions(+), 55 deletions(-) (limited to 'lib/wx') diff --git a/lib/wx/examples/demo/demo.erl b/lib/wx/examples/demo/demo.erl index 59c20e09fb..61e71af021 100644 --- a/lib/wx/examples/demo/demo.erl +++ b/lib/wx/examples/demo/demo.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -27,7 +27,7 @@ -behaviour(wx_object). -export([start/0, start/1, start_link/0, start_link/1, format/3, init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -record(state, {win, demo, example, selector, log, code}). @@ -189,6 +189,10 @@ handle_call(Msg, _From, State) -> io:format("Got Call ~p~n",[Msg]), {reply,ok,State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + %% Async Events are handled in handle_event as in handle_info handle_event(#wx{event=#wxCommand{type=command_listbox_selected, cmdString=Ex}}, State = #state{demo={_,DemoSz}, example=Example, code=Code}) -> diff --git a/lib/wx/examples/demo/ex_aui.erl b/lib/wx/examples/demo/ex_aui.erl index 6adfd970fc..50f077638d 100644 --- a/lib/wx/examples/demo/ex_aui.erl +++ b/lib/wx/examples/demo/ex_aui.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,7 +25,7 @@ %% wx_object callbacks -export([init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include("../../include/wx.hrl"). @@ -92,6 +92,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config, "Got Call ~p\n", [Msg]), {reply,{error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + %% Async Events are handled in handle_event as in handle_info handle_event(#wx{obj = Notebook, event = #wxCommand{type = command_button_clicked}}, diff --git a/lib/wx/examples/demo/ex_button.erl b/lib/wx/examples/demo/ex_button.erl index 28c8273cb9..0dd0363933 100644 --- a/lib/wx/examples/demo/ex_button.erl +++ b/lib/wx/examples/demo/ex_button.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -26,7 +26,7 @@ -behaviour(wx_object). -export([start/1, init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -record(state, { @@ -153,6 +153,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config,"Got Call ~p~n",[Msg]), {reply,ok,State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_canvas.erl b/lib/wx/examples/demo/ex_canvas.erl index 844c7eddf3..1ec4760f40 100644 --- a/lib/wx/examples/demo/ex_canvas.erl +++ b/lib/wx/examples/demo/ex_canvas.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,7 +25,7 @@ %% wx_object callbacks -export([init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2, handle_sync_event/3]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2, handle_sync_event/3]). -include_lib("wx/include/wx.hrl"). @@ -144,6 +144,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config, "Got Call ~p\n", [Msg]), {reply,{error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_canvas_paint.erl b/lib/wx/examples/demo/ex_canvas_paint.erl index 38d6b62f1d..9bc083766a 100644 --- a/lib/wx/examples/demo/ex_canvas_paint.erl +++ b/lib/wx/examples/demo/ex_canvas_paint.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,7 +25,7 @@ %% wx_object callbacks -export([init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2, handle_sync_event/3]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2, handle_sync_event/3]). -include_lib("wx/include/wx.hrl"). @@ -211,6 +211,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config, "Got Call ~p\n", [Msg]), {reply,{error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_choices.erl b/lib/wx/examples/demo/ex_choices.erl index 75f8d22493..2e456ae249 100644 --- a/lib/wx/examples/demo/ex_choices.erl +++ b/lib/wx/examples/demo/ex_choices.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -21,7 +21,7 @@ -behaviour(wx_object). -export([start/1, init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include_lib("wx/include/wx.hrl"). @@ -147,6 +147,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config,"Got Call ~p\n",[Msg]), {reply, {error,nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_cursor.erl b/lib/wx/examples/demo/ex_cursor.erl index 322bdcbb6c..c1a558541b 100644 --- a/lib/wx/examples/demo/ex_cursor.erl +++ b/lib/wx/examples/demo/ex_cursor.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,7 +25,7 @@ %% wx_object callbacks -export([init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include_lib("wx/include/wx.hrl"). @@ -135,6 +135,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config, "Got Call ~p\n", [Msg]), {reply,{error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_dialogs.erl b/lib/wx/examples/demo/ex_dialogs.erl index 020e9eeb14..b39344f8b1 100644 --- a/lib/wx/examples/demo/ex_dialogs.erl +++ b/lib/wx/examples/demo/ex_dialogs.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,7 +25,7 @@ %% wx_object callbacks -export([init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include_lib("wx/include/wx.hrl"). @@ -153,6 +153,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config, "Got Call ~p\n", [Msg]), {reply,{error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_frame_utils.erl b/lib/wx/examples/demo/ex_frame_utils.erl index 3064c9f3b7..a90642b355 100644 --- a/lib/wx/examples/demo/ex_frame_utils.erl +++ b/lib/wx/examples/demo/ex_frame_utils.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,7 +25,7 @@ %% wx_object callbacks -export([init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include_lib("wx/include/wx.hrl"). @@ -102,6 +102,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config, "Got Call ~p\n", [Msg]), {reply,{error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_gauge.erl b/lib/wx/examples/demo/ex_gauge.erl index d30c3fea58..ffc667ff05 100644 --- a/lib/wx/examples/demo/ex_gauge.erl +++ b/lib/wx/examples/demo/ex_gauge.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -23,7 +23,7 @@ -include_lib("wx/include/wx.hrl"). -export([start/1, init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -record(gauge, {obj, value, @@ -118,6 +118,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config,"Got Call ~p\n",[Msg]), {reply,ok, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + %% Async Events are handled in handle_event as in handle_info handle_event(#wx{id = ?ID_START_STOP, event = #wxCommand{type = command_togglebutton_clicked, diff --git a/lib/wx/examples/demo/ex_gl.erl b/lib/wx/examples/demo/ex_gl.erl index 53f1eda847..72dad2cf9d 100644 --- a/lib/wx/examples/demo/ex_gl.erl +++ b/lib/wx/examples/demo/ex_gl.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -21,7 +21,7 @@ -behaviour(wx_object). -export([init/1, code_change/3, handle_info/2, handle_event/2, - handle_call/3, terminate/2, + handle_call/3, handle_cast/2, terminate/2, start/1]). -include_lib("wx/include/wx.hrl"). @@ -118,6 +118,10 @@ handle_call(Msg, _From, State) -> io:format("Got Call ~p~n",[Msg]), {reply,ok,State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, not_yet_implemented, State}. diff --git a/lib/wx/examples/demo/ex_graphicsContext.erl b/lib/wx/examples/demo/ex_graphicsContext.erl index bcd7a75be0..c356500d99 100644 --- a/lib/wx/examples/demo/ex_graphicsContext.erl +++ b/lib/wx/examples/demo/ex_graphicsContext.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -26,7 +26,7 @@ %% wx_object callbacks -export([init/1, terminate/2, code_change/3, handle_info/2, handle_call/3, - handle_event/2, handle_sync_event/3]). +handle_cast/2, handle_event/2, handle_sync_event/3]). -include_lib("wx/include/wx.hrl"). @@ -98,6 +98,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config, "Got Call ~p\n", [Msg]), {reply,{error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_grid.erl b/lib/wx/examples/demo/ex_grid.erl index 2169c818ff..d1a9952ab2 100644 --- a/lib/wx/examples/demo/ex_grid.erl +++ b/lib/wx/examples/demo/ex_grid.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,7 +25,7 @@ %% wx_object callbacks -export([init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include_lib("wx/include/wx.hrl"). @@ -81,6 +81,10 @@ handle_info(_Msg, State) -> handle_call(_Msg, _From, State) -> {reply,{error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_htmlWindow.erl b/lib/wx/examples/demo/ex_htmlWindow.erl index b864cd10b2..564c790e48 100644 --- a/lib/wx/examples/demo/ex_htmlWindow.erl +++ b/lib/wx/examples/demo/ex_htmlWindow.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,7 +25,7 @@ %% wx_object callbacks -export([init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include("../../include/wx.hrl"). @@ -81,6 +81,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config, "Got Call ~p\n", [Msg]), {reply,{error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_listCtrl.erl b/lib/wx/examples/demo/ex_listCtrl.erl index 3faec4e229..13096dfa52 100644 --- a/lib/wx/examples/demo/ex_listCtrl.erl +++ b/lib/wx/examples/demo/ex_listCtrl.erl @@ -23,7 +23,7 @@ -behaviour(wx_object). -export([start/1, init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -record(state, { @@ -147,6 +147,11 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config,"Got Call ~p\n",[Msg]), {reply,ok,State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_notebook.erl b/lib/wx/examples/demo/ex_notebook.erl index 2e16ccfffa..fc38fdae08 100644 --- a/lib/wx/examples/demo/ex_notebook.erl +++ b/lib/wx/examples/demo/ex_notebook.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -23,7 +23,7 @@ -behaviour(wx_object). -export([start/1, init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -record(state, { @@ -133,6 +133,11 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config,"Got Call ~p\n",[Msg]), {reply,ok,State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_pickers.erl b/lib/wx/examples/demo/ex_pickers.erl index 892c5b449d..8013a5ba32 100644 --- a/lib/wx/examples/demo/ex_pickers.erl +++ b/lib/wx/examples/demo/ex_pickers.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,7 +25,7 @@ %% wx_object callbacks -export([init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include_lib("wx/include/wx.hrl"). @@ -124,6 +124,11 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config, "Got Call ~p\n", [Msg]), {reply,{error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_popupMenu.erl b/lib/wx/examples/demo/ex_popupMenu.erl index 8774dbef7b..d6778c5dc5 100644 --- a/lib/wx/examples/demo/ex_popupMenu.erl +++ b/lib/wx/examples/demo/ex_popupMenu.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,7 +25,7 @@ %% wx_object callbacks -export([init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include_lib("wx/include/wx.hrl"). @@ -90,6 +90,11 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config, "Got Call ~p\n", [Msg]), {reply,{error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_radioBox.erl b/lib/wx/examples/demo/ex_radioBox.erl index 8211aec4a2..ab7685f41f 100644 --- a/lib/wx/examples/demo/ex_radioBox.erl +++ b/lib/wx/examples/demo/ex_radioBox.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -21,7 +21,7 @@ -behaviour(wx_object). -export([start/1, init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include_lib("wx/include/wx.hrl"). @@ -107,6 +107,9 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config,"Got Call ~p\n",[Msg]), {reply, {error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_sashWindow.erl b/lib/wx/examples/demo/ex_sashWindow.erl index dd05f4e45f..d8a8958f28 100644 --- a/lib/wx/examples/demo/ex_sashWindow.erl +++ b/lib/wx/examples/demo/ex_sashWindow.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,7 +25,7 @@ %% wx_object callbacks -export([init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include_lib("wx/include/wx.hrl"). @@ -116,6 +116,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config, "Got Call ~p\n", [Msg]), {reply,{error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_sizers.erl b/lib/wx/examples/demo/ex_sizers.erl index 2cc6efd503..7b9e8eb37f 100644 --- a/lib/wx/examples/demo/ex_sizers.erl +++ b/lib/wx/examples/demo/ex_sizers.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,7 +25,7 @@ %% wx_object callbacks -export([init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include_lib("wx/include/wx.hrl"). @@ -101,6 +101,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config, "Got Call ~p\n", [Msg]), {reply,{error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_slider.erl b/lib/wx/examples/demo/ex_slider.erl index 7b669d96f6..612543ff26 100644 --- a/lib/wx/examples/demo/ex_slider.erl +++ b/lib/wx/examples/demo/ex_slider.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -21,7 +21,7 @@ -behaviour(wx_object). -export([start/1, init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include_lib("wx/include/wx.hrl"). @@ -101,6 +101,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config,"Got Call ~p\n",[Msg]), {reply, {error, nyi},State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_splitterWindow.erl b/lib/wx/examples/demo/ex_splitterWindow.erl index c135f298fa..4f25b73293 100644 --- a/lib/wx/examples/demo/ex_splitterWindow.erl +++ b/lib/wx/examples/demo/ex_splitterWindow.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,7 +25,7 @@ %% wx_object callbacks -export([init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include_lib("wx/include/wx.hrl"). @@ -90,6 +90,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config, "Got Call ~p\n", [Msg]), {reply,{error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_static.erl b/lib/wx/examples/demo/ex_static.erl index 67061520c4..013bd5ac35 100644 --- a/lib/wx/examples/demo/ex_static.erl +++ b/lib/wx/examples/demo/ex_static.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,7 +25,7 @@ %% wx_object callbacks -export([init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include_lib("wx/include/wx.hrl"). @@ -105,6 +105,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config, "Got Call ~p\n", [Msg]), {reply,{error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_textCtrl.erl b/lib/wx/examples/demo/ex_textCtrl.erl index 95837c7c4c..d82884f30b 100644 --- a/lib/wx/examples/demo/ex_textCtrl.erl +++ b/lib/wx/examples/demo/ex_textCtrl.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -21,7 +21,7 @@ -behaviour(wx_object). -export([start/1, init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include_lib("wx/include/wx.hrl"). @@ -92,6 +92,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config,"Got Call ~p\n",[Msg]), {reply, {error,nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/demo/ex_treeCtrl.erl b/lib/wx/examples/demo/ex_treeCtrl.erl index fa40795393..611904500a 100644 --- a/lib/wx/examples/demo/ex_treeCtrl.erl +++ b/lib/wx/examples/demo/ex_treeCtrl.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,7 +25,7 @@ %% wx_object callbacks -export([init/1, terminate/2, code_change/3, - handle_info/2, handle_call/3, handle_event/2]). + handle_info/2, handle_call/3, handle_cast/2, handle_event/2]). -include_lib("wx/include/wx.hrl"). @@ -109,6 +109,10 @@ handle_call(Msg, _From, State) -> demo:format(State#state.config, "Got Call ~p\n", [Msg]), {reply,{error, nyi}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, ignore, State}. diff --git a/lib/wx/examples/sudoku/sudoku_board.erl b/lib/wx/examples/sudoku/sudoku_board.erl index 756837582f..4b26ff97da 100644 --- a/lib/wx/examples/sudoku/sudoku_board.erl +++ b/lib/wx/examples/sudoku/sudoku_board.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -30,7 +30,7 @@ draw/3, %% Callbacks init/1, handle_sync_event/3, - handle_event/2, handle_info/2, handle_call/3, + handle_event/2, handle_info/2, handle_call/3, handle_cast/2, code_change/3, terminate/2]). -include("sudoku.hrl"). @@ -209,6 +209,10 @@ handle_call({draw, DC, Size},_From, S) -> redraw(DC,Size,S), {reply, ok, S}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, not_yet_implemented, State}. diff --git a/lib/wx/examples/sudoku/sudoku_gui.erl b/lib/wx/examples/sudoku/sudoku_gui.erl index 4aaecfe086..3d0c95ffa7 100644 --- a/lib/wx/examples/sudoku/sudoku_gui.erl +++ b/lib/wx/examples/sudoku/sudoku_gui.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -24,7 +24,7 @@ %%%------------------------------------------------------------------- -module(sudoku_gui). --export([init/1, handle_info/2, handle_call/3, handle_event/2, +-export([init/1, handle_info/2, handle_call/3, handle_cast/2, handle_event/2, terminate/2, code_change/3]). -compile(export_all). @@ -230,6 +230,10 @@ handle_event(Msg,S) -> handle_call(What, _From, State) -> {stop, {call, What}, State}. +handle_cast(Msg, State) -> + io:format("Got cast ~p~n",[Msg]), + {noreply,State}. + code_change(_, _, State) -> {stop, not_yet_implemented, State}. -- cgit v1.2.3