IRC Log Viewer » #firebreath » 2011-07-26

IRC Nick Time (GMT-7) Message
rashmi 00:07 hi
i am a beginner here
i copy pasted d build log
taxilian 00:07 paste it in pastebin and paste the link here
rashmi 00:07 in d above paste bin
http://fpaste.org/Cb4A/
d last two errors r d ones dat i am talking about
taxilian 00:07 you know, people will take you much more seriously if you actually type things out — just a suggestion
rashmi 00:07 ohk
thanks
d error
taxilian 00:07 can you pastebin me the function in npkPointAPI that line 259 is in?
rashmi 00:07 oh yes
sure
width = myCapture->myWidth; height = myCapture->myHeight;
d above 2 lines
taxilian 00:07 I need the whole function; I need to know the context
rashmi 00:07 n also width and height are FB::variant
ohk
taxilian 00:07 why exactly are width and height FB::variant?
rashmi 00:07 http://fpaste.org/WBm3/
taxilian 00:07 oh, that makes sense
you can't pass by reference like that from javascript
and since width and height are const, you can't assign to them
rashmi 00:07 oh yes
basic programming laguage concept
so wat do i do here?
taxilian 00:07 well, you have a few options
rashmi 00:07 remove d const identifier?
taxilian 00:07 you could return an array
no, you can't pass by reference from javascript
it won't work
no matter what you do
rashmi 00:07 ohk
so hw do i pass an array from here?
taxilian 00:07 the only reason you do const <obj type>& here is to keep it from making a copy unneccesarily
rashmi 00:07 okk
taxilian 00:07 you can return an array by having the return type be FB::VariantList and return FB::variant_list_of(width)(height)
that will return a javascript array
probably the easiest solution, if you need it to all come from the same function
you could also return a javascript object with {"width": …, "height": ...}
with a FB::VariantMap
rashmi 00:07 ohkk
nw i get it
thank u so much
taxilian 00:07 you're welcome
Imran 00:07 Hello :how to convert FB::variant variable to char* or any other sring data type??
taxilian 00:07 !wiki interacting with javascript
FireBreathBot 00:07 6 results found. Note: Results limited to 8
"Interacting with Javascript": http://goo.gl/kN03n
"Using FireBreath": http://goo.gl/IHwid
"Plugin Lifecycle": http://goo.gl/nVhKS
"FireBreath Users": http://goo.gl/erPde
"Version History": http://goo.gl/lgWpo
"Web Browser Plugins in the Age of Web Applications.pdf": http://goo.gl/vS7zB
taxilian 00:07 !wiki variant
FireBreathBot 00:07 8 results found. Note: Results limited to 8
"class FB variant variant (3)": http://goo.gl/STqau
"class FB variant variant": http://goo.gl/Yh4jU
"class FB variant variant (2)": http://goo.gl/ObWXt
"class FB variant ~variant": http://goo.gl/cACvQ
"file variant_conversions.h": http://goo.gl/9ZWpg
"file variant_list.h": http://goo.gl/9v3I6
"file variant_map.h": http://goo.gl/WEaRO
"class FB variant": http://goo.gl/4jHZN
taxilian 00:07 !wiki classVariant
FireBreathBot 00:07 3 results found. Note: Results limited to 8
"classVariant": http://goo.gl/X3Wiy
"Using FireBreath": http://goo.gl/IHwid
"JSAPIAuto": http://goo.gl/adbas
taxilian 00:07 the last one in particular has what you need
but the first one you should read if you haven't
Imran 01:07 i didn't get much from above links as i m totally new to this i m using this method testMsg(const FB::variant& str) i want to convert str variable to CString or char*
taxilian 01:07 I'll give you this one, but the information is there
var.convert_cast<std::string>()
that will return a std::string
you can then use .c_str() to get the char* if you need it
Imran 01:07 hmm thanks
taxilian 01:07 convert_cast can be used to convert it to most datatypes
but we don't ever deal with raw char*
because then what we return would have to be freed
Imran 01:07 okay
Imran 01:07 Thanks Taxilian it works but now the message that i m passing from browser to firebreath it changes the language i.e from english to some other...
taxilian 01:07 show me your conversion code
Imran 01:07 string st=str.convert_cast<std::string>(); const char* c=st.c_str();
MessageBox(NULL, (LPCTSTR)c, L"Message", MB_OK | MB_ICONASTERISK);
taxilian 01:07 dude; MessageBox there is going to expect a wide char string
You could try MessageBoxA
that might work, not sure
but you really shouldn't be using a messagebox anyway
Imran 01:07 okay
taxilian 01:07 you do that in production and you'll have browser companies shutting you donw
you *never* block the main thread
Imran 01:07 i m just testing it with message box
taxilian 01:07 debuggers are a better solution
you know what is actually happening
Imran 01:07 nos
nops
Thanks it works now and sorry for my stupid Question
taxilian 01:07 not a stupid question; just one that you could have found yourself with a bit more digging. however, if it's not clear, please feel free to update the wiki so that it is; that's the best way to say "thanks"
taxilian 01:07 g'night all
hhshhm 02:07 hi
someone-noone 04:07 hello
someone-noone 05:07 how to toggle Core Graphics application to full-screen?
neilg_ 08:07 Morning all
taxilian 09:07 g'morning
someone-noone: I haven't tried it, but I'm guessing you'd have to create a new fullscreen NSWindow and draw in its context
random off-topic question; any of you guys used VMWare's vSphere client on windows? I'm having some issues with it
gphysics2014 09:07 I am having trouble importing dll libraries. Would anyone be able to help me?
taxilian 09:07 I can try
generally, it's best to just ask your question; we'll help if we can
gphysics2014 09:07 I am trying to use "#import <dllname.dll>" to import a number of dlls. I am using visual studio 2008. I added the paths to Properties -> Project Settings -> C/C++ -> General -> Additional Include Directories. After doing this the compiler seems to find the dlls OK, but I get errors saying "unresolved external symbol DllCanUnloadNow" and "unresolved external symbol DllGetClassObject"
taxilian 09:07 well, first of all, you should generally not modify the include dirs directly in visual studio, though for proof of concept testing it's not a big deal
just make sure you change it in cmake for the long term
secondly, though, I never use #import, so I don't have any idea
are these COM libraries?
gphysics2014 09:07 Yes they are com libraries
taxilian 09:07 hmm. I have worked with a OCX using import, but I didn't have any such issues; that doesn't make any sense to me. DllCanUnloadNow and GetClassObject are both implemented in FireBreathWin.cpp
!findfile FireBreathWin.cpp
FireBreathBot 09:07 Found 1 matching file(s) in the master branch. First 1 are:
src/PluginAuto/Win/FireBreathWin.cpp http://goo.gl/bBhzJ
gphysics2014 09:07 The error comes up as occuring in FireBreathWin.def
taxilian 09:07 have you made changes to any firebreath source files outside of your own plugin project?
gphysics2014 09:07 I have not.
someone-noone 09:07 !help
offtopic: how to get list of all supported commands?
taxilian 09:07 gphysics2014: I'd try deleting your build dir and running the prep script again
.bothelp
FireBreathBot 09:07 Bot help -- most used commands:
!findfile <regex> - Search for files in the project tree on github
!find <symbol> - use ctags to search for a symbol in the source tree
!wiki <search string> - search the wiki for the given string
git pull requests - list all open pull requests for the project
.pb - remind users about pastebin services
.ask - remind users to ask their question rather than waiting for someone to come
.g <search string> - search google for <search string> and return the url of the first response
.lmgt <search string> - display 'Let me Google that for you' link for <search string>
.extensions - Display a summary of the difference between a plugin and an extension.
gphysics2014 09:07 allright. ill try
gphysics2014 10:07 taxilian: I deleted my build directory and ran the prep script again and get the same errors.
taxilian 10:07 I don't know, then; you could try commenting things out until the errors go away, see if you can isolate the cause
y0h4n 10:07 hi all
taxilian 10:07 hello
gphysics2014 10:07 Since the errors don't start until add the directory for the dlls to visual basic's additional include directories I am trying to include the dlls using cmake. I don't have any experience with cmake. I have been trying to follow this http://www.firebreath.org/display/documentation/Using+Libraries. and havent had any luck.
Currently i have added this to my cmake file.
set (LIBRARY_PATH C:\Program Files\Common Files\Polytec\COM)
target_link_libraries(${PROJECT_NAME} debug "${LIBRARY_PATH }/debug/PhysicalUnit.dll")
target_link_libraries(${PROJECT_NAME} optimized "${SANDSTONE_DIR}/release/PhysicalUnit.dll")
taxilian 10:07 you can't add .dll files as libraries that
that way
you can add the include_directory
but not the libraries
because DLL files are not libraries in that sense
y0h4n 10:07 anyone can help? i'm developing a npapi plugin with firebreath using netbeans, after build the project, netbeans dont create the .plugin file (in macosx) (the build is sucesfull)
taxilian 10:07 you can't use netbeans on mac os x
the only supported build environment on mac os x currently is xcode
someone-noone 10:07 you shoud use xcode instead
or you should make bundle manually
taxilian 10:07 which is free (or $5, depending on how you get it)
one of these days I'll get around to porting forward the code that makes unix makefiles work
but it will only work with cmake 2.8.5
and I don't have time right now
someone-noone 10:07 < me hates working with xcode
love netbeans
taxilian 10:07 you can try it on your own if you'd like; I can tell you where the branch that had it working is
someone-noone: xcode is actually a pretty nice IDE, but it takes some getting used to
y0h4n 10:07 i made the prepmake.sh like in unix and i bundle manually to develop it in netbeans
taxilian 10:07 y0h4n: please reread my previous comments
someone-noone 10:07 i hate xcode for 2 things
gphysics2014 10:07 taxilian: I actually tried that first. The include directories section of my CMakeLists.txt looks like this "include_directories(${PLUGIN_INCLUDE_DIRS} C:\Program Files\Common Files\Polytec\COM )" and I still get the error "Cannot open type library file: 'PhysicalUnit.dll' " which is in the included directory?
taxilian 10:07 gphysics2013: you'll have to put quotes around directories with spaces in it
someone-noone 10:07 first in xcode3: when i debug, smth really weird can happen with IDE. If i left-click, it do "multi-click", even can cut my code. It solves only if i do specific "magic" with mouse
xcode4: caching....
y0h4n 10:07 i tryed before to develo my plugin with xcode but i have many troubles to add some paths
taxilian 10:07 someone-noone: the first problem I have never seen
y0h4n: it's doable
someone-noone 10:07 y0h4n: you should solve that with xcode
with CMakeLists.txt files
it's really easy task
there is amazing video tutorial for it
y0h4n 10:07 mmm i will try again i will tell u how it has gone in few mins
taxilian 10:07 that's covered in the video tutorials?
seriously?
huh
someone-noone 10:07 y0h4n: best way if you tell us for issues that you're getting in xcode
i'm sure they're all sovlable
taxilian: yes, it's covered. You're talking smth like this: "here you should add your libraries" and bla-bla
:)
taxilian 10:07 that was good thinking
I'm smarter than I thought
someone-noone 10:07 :)
y0h4n 10:07 i dont know so well where i have to add some paths of the libs and headers in xcode
in netbeans i use link.txt and flags.make
someone-noone 11:07 find projectDef.cmake
taxilian 11:07 you don't do it in xcode
and you don't do it in link.txt or flags.make
you use cmake
someone-noone 11:07 in Mac/projectDef.cmake
there you will find include_directories, find_library and target_link_libraries directive
taxilian 11:07 !wiki Libraries
FireBreathBot 11:07 8 results found. Note: Results limited to 8
"Using Libraries": http://goo.gl/cUVa6
"Re: Feedback": http://goo.gl/xZWWc
"Building on Mac OS X": http://goo.gl/iQ1mh
"Documentation To-Do": http://goo.gl/XzBGF
"Ideas": http://goo.gl/7QuAp
"FireBreath 1.5.0RC1 Released!": http://goo.gl/lppMa
"Helpful Links": http://goo.gl/vDlMu
"FireBreath 1.5.0 Released!": http://goo.gl/xzf0Y
taxilian 11:07 worth reading that first page as well
someone-noone 11:07 remember to run ./prepmac.sh each time you made changes to files
to cmake files *
otherwise you will not see any changes in your project
taxilian 11:07 and you'll have to delete your build directory to get rid of the make files first
someone-noone 11:07 or make smth like this ./prepmac.sh ./projects/my_plugin ./buildmac
today, i was building ffmpeg for windows...and i want to tell you one sad story
in two words: you can't do it from windows, instead you should use binutils and cross-compiling
no-no, you can on windows, but it's a painful task
taxilian 11:07 lol
y0h4n 11:07 thx guys ^^
taxilian 11:07 y0h4n: good luck; and btw, your irc nick is a pain to type
someone-noone 11:07 but, okay. You've downloaded and installed mingw-binutils and ready for cross-compiling
but! if you want to use in VS you should install wine, than VS C++ on it!
and you can do it only on Ubuntu :rofl:
the whole day i'm switching between 3 OS's
taxilian 11:07 welcome to my life
someone-noone 11:07 :how i love this cross-platform stuff:
just completed compiling of dlls. Now i'm happy like an elephant :)
mission accomplished
y0h4n 11:07 hi guys again ^^i solve my problems with the libs but i dont know how and where i have to add paths for headers :( any help about it
taxilian 11:07 did you read the page on Using Libraries?
y0h4n 11:07 y but i dont understand so well
taxilian 11:07 go read it again, pay attention to the command "include_directories"
gphysics2014 12:07 When I #include <afxwin.h> it causes errors "unresolved external symbol DllCanUnloadNow" and "unresolved external symbol DllGetClassObject" in FireBreathWin.def
taxilian 12:07 why do you need afxwin.h?
gphysics2014 12:07 Thanks, I don't I was just copying and pasting from an example project and that got included.
jshanab_wcw 13:07 I am drawing a page with multiple videos in the browser. as I scroll the page the videos that get clipped by the bottom or the top flicker as I scroll the browser. Really annoying. I am responding to rezise,refresh and clipChanged event. What am I missing
taxilian 13:07 this is windows?
jshanab_wcw 13:07 Yes, windows using directx3d
taxilian 13:07 yeah, I've seen that issue as well
but I don't know of a fix
jshanab_wcw 13:07 let me see if ti is actually calling the cliprect one.
jshanab_wcw 14:07 OK, the onRefresh event gets called when i thought, the ClipChangeEvent is not firing at all
ClipChangeEvent is not in the windows pluginWindowWin, i guess it is only a MAC and X11 thing
taxilian 14:07 yeah
hmm. you might actually be able to get it in firefox / windows
or perhaps you could try having it fire a RefreshEvent any time setwindow is called
jshanab_wcw 14:07 setwindow?
taxilian 14:07 !find SetWindow
FireBreathBot 14:07 Found 6 possible matches. Displaying 5
/^NPError NpapiPlugin::SetWindow(NPWindow* window)$/ (f) found in src/NpapiCore/NpapiPlugin.cpp: http://goo.gl/gcY9z
/^NPError PluginWindowMacCG::SetWindow(NPWindow* window)$/ (f) found in src/PluginAuto/Mac/PluginWindowMacCG.cpp: http://goo.gl/Y3xnw
/^NPError PluginWindowMacQD::SetWindow(NPWindow* window)$/ (f) found in src/PluginAuto/Mac/PluginWindowMacQD.cpp: http://goo.gl/cC7nx
/^NPError NpapiPluginWin::SetWindow(NPWindow* window)$/ (f) found in src/PluginAuto/Win/NpapiPluginWin.cpp: http://goo.gl/rqikb
/^NPError NpapiPluginX11::SetWindow(NPWindow* window)$/ (f) found in src/PluginAuto/X11/NpapiPluginX11.cpp: http://goo.gl/tXml6
taxilian 14:07 that's what Firefox calls when it gives us the hwnd
or if the clipping and such changes
on windows we don't usually care about the clipping; not even sure if it gives it to us or not
jshanab_wcw 14:07 When i wrote win32 stuff long ago, the cliping was crittical in reducing the area of the invlidate rectangle, but as i recall, that just looped back into paint,
That is different than the AttachWindow?
taxilian 14:07 well, you are welcome to wire in the ClipChanged event if you'd like
SetWindow is what causes the AttachedEvent
but only the first time the window is set
it sends lots of extra SetWindow calls for who-knows-what reason
it's conceivable that some of those may be letting you know to draw, though that seems a little odd
jshanab_wcw 14:07 ok, i will play. Maybe i can do it at the directx level, when i used SDL it somehow handled it
someone-noone 14:07 jshanab_wcw: hello
i'm starting to implement plugin on windows... could you advice some links from which to start?
jshanab_wcw 14:07 hello
taxilian 14:07 jshanab_wcw: seriously, I'd take a look at SetWindow in NpapiPluginWin and where it short-circuits if the window is already created, have it send a RefreshEvent
see if that helps
jshanab_wcw 14:07 ok. will do!
someone-noone, www.firebreath.org? seriously what will the plugin do?
taxilian 14:07 I think he's trying to use SDL
someone-noone 14:07 :)
i will do the same thing. i will draw yuv frames
i'm going to start to play with sdl 1.3
if it will fail, i will do it on directx
but i don't know anything about directx
jshanab_wcw 14:07 someone-noone. well, i tried 3 times to get sdl-1.3 to work. the last time a few days. I could not get it to work because it expects to handle threads and events itself and that gets locked up. Ok if you create a window, but not createwindowfrom(HWND).
taxilian 14:07 oh, directx is *loads* of fun, right jshanab_wcw?
jshanab_wcw 14:07 I knew nothing about directX a few days ago, but it is very,very similar to opengl, except that they chaged there mind 3 to 5 times and the documentation is surprizingly bad.
someone-noone 14:07 what happend if you use createwindowfrom?
jshanab_wcw 14:07 It consists of a few steps. MSDN is major ref.
someone-noone 14:07 i mean what problems with createwindowfrom?
only events or what?
jshanab_wcw 14:07 either I didn't destroy the window or quit, a memory leak when the user changes focus or It blocks when you do try, the browser is blocking the thread, i think cause it still owns it. When we use the CreateWindow, SDL owns it all and you can safely close out the resources
someone-noone 14:07 that's clear
jshanab_wcw 14:07 in SSDL-1.3 when you inti the video, it also inits the event system and keyboard system. cannot stop it. It also is extreemly particular about all init, destroy and draw on the same thread, the list says needs to all be on main, which is a joke in a plugin.
taxilian 14:07 that shouldn't be a problem; you just determine that a different thread will be the main thread for SDL =]
and make a new thread and do it all there
someone-noone_ 14:07 so... event handling is different from SDL-1.2 ?
taxilian 14:07 someone-noone_: highly recommend getting a real IRC client; the web one is nice for luring people in, but it's not always very reliable
someone-noone_ 14:07 getting trouble with Adium and irc
don't know how to fix
taxilian 14:07 huh. that's what I'm using
you could use colloquy, it's decent
someone-noone_ 14:07 currently web irc is good for me
jshanab_wcw 14:07 taxillian. yes i put it all on it's own thread, but If i use CreateWindowFrom (instead of the popup from CreatWindow) I cannot free it and that crashes things. (although i did get it working in IE only for short periods with FF being completly taken over)
taxilian 14:07 CreateWindowEx should be able to make a child window that you can free
jshanab_wcw 14:07 I use the xulrunner and run chatzilla in it's own process. very stable
taxilian 14:07 where is CreateWindowFrom even defined? I've never heard of it, can't find docs...
someone-noone 14:07 SDL_CreateWindowFrom
returns SDL_Window
taxilian 14:07 ....
someone-noone 14:07 from hnwd
taxilian 14:07 dude, no
no no no no no
you've totally missed the point
you don't create a new SDL window
when you do that you're telling SDL which HWND to use
jshanab_wcw 14:07 taxilian. I will have to try that as a child. i refactored the code so I can switch from sdl to d3d on a variable.
taxilian 14:07 you need to create a new *HWND*
you aren't going to ever be able to hand the browser's HWND to SDL and have it work
but you should be able to make a child hwnd and give that to it
jshanab_wcw 14:07 He is talking about an SDL_Window, and object required by the other calls. you still need one
someone-noone 14:07 right
taxilian 14:07 well yeah; but you don't create it from the HWND the browser gives you
someone-noone 14:07 but you need
to create a child hwnd
taxilian 14:07 sure you'll use that call
but only after you make an HWND to give it
someone-noone 14:07 and only after that use SDL_CreateWIndowFrom
taxilian 14:07 right
jshanab_wcw 14:07 That might do the trick!
taxilian 14:07 sorry; I thought I'd suggested that to you and you tried it, but I guess I wasn't clear
jshanab_wcw 14:07 How do i send that refresh event from inside that npapiPluginWin.cpp?
taxilian 14:07 it will most likely do the trick, as long as you handle the threading correctly
jshanab_wcw: look at PluginWindowWin and copy what it does
!findfile PluginWindowWin.cpp
jshanab_wcw 14:07 You suggested it, i remember it but at the time I did not quite get it ai think
FireBreathBot 14:07 Found 1 matching file(s) in the master branch. First 1 are:
src/PluginAuto/Win/PluginWindowWin.cpp http://goo.gl/NdqTe
jshanab_wcw 14:07 taxilian. if i make these changes and it works, will they persist past a prep or an update to the next ver of FB? (are these a generated part of my project from fbgen or prep)
taxilian 14:07 if you make the changes and it works you should then submit to me a patch and it will be incorporated into FireBreath
jshanab_wcw 14:07 :-)
taxilian 14:07 and then, yes, it will persist past an update
someone-noone 14:07 tried again adium. it doesn't connect
afaik, there is at least 3 concurrent connections is possible from one IP
taxilian 14:07 you may have a firewall in your way
someone-noone 14:07 are*
but icq is working
taxilian 14:07 I have at least that many connected currently
someone-noone 14:07 and google talk too
taxilian 14:07 IRC could be filtered
someone-noone 14:07 how?
taxilian 14:07 I don't know; I know nothing about your ISP
but I have run into that problem before; the university I attended blocked IRC
someone-noone 14:07 no it''s impossible to my ISP
which of servers are you using in Adium?
server*
taxilian 14:07 well, I'm actually using ZNC
that is connected to irc.freenodenet
irc.freenode.net
someone-noone 15:07 hm, getting strange error:
nodename nor servname provider, or not known
provided*
taxilian 15:07 this is in adium?
someone-noone 15:07 yeah
taxilian1 15:07 so this is frrom Adium directly;
set my nickname, set hostname to irc.freenode.net, set password to my nickserv password
someone-noone 15:07 dk, what is the problem. one day it was working
taxilian1 15:07 realname is set, username set
port 6667 without ssl encryption
do you have ssl encryption off?
someone-noone 15:07 i can set only password
yes
taxilian1 15:07 if you disconnect the account then you can set the others
someone-noone 15:07 don't see them
jshanab_wcw 15:07 taxilian on windows, I am a windowless plugin?
someone-noone 15:07 no
you are not
taxilian_away 15:07 jshanab_wcw: if you were windowless all you'd get would be a hDC
not hWnd at all
someone-noone 15:07 http://cl.ly/0I0p0d0P271T323e2w0A
have only this
taxilian 15:07 lol. adium crashed on me
someone-noone: the other stuff is in the other tabs
someone-noone 15:07 lol
i was blind
no changes...
will use qwebirc
lol.. translator translated "Copy error message" as "Copying error" :)
someone-noon 15:07 got very funny issue that made me laugh:
toggled fullscreen and forgot to "uncheck" breakpoints. And my app hangs and i even couldn't kill it with cmd+alt+esc
taxilian 15:07 hehe
you couldn't cmd+tab back to xcode?
did you make it always on top or something?
(if so, that's a bad idea; I think you see why)
someone-noon 15:07 yeah, i should it do it on +1 level i guess
but i was doing on top
taxilian 15:07 even Flash doesn't make it always on top; have it default to over the browser, sure, but don't force it to be on top
someone-noon 15:07 yeah, i couldn't cmd+tab
just in the example i've found was the top realization, so actually i didn't find that +1 level function yet :). just started full screen for the first time to test
jshanab_wcw 15:07 taxilian. i cannot find where an event gets procesed (or even passed) Is there a diagram or something that shows how it goes thru NpapiPluginWin.cpp and PluginWindowWin.cpp? I do not actually see liek the WM_ERASEBKGND
taxilian 15:07 when you say event; are you talking about a FireBreath event or a windows event?
!find SendEvent
FireBreathBot 15:07 Found 1 possible matches. Displaying 1
/^bool PluginEventSource::SendEvent(PluginEvent* evt)$/ (f) found in src/PluginCore/PluginEventSource.cpp: http://goo.gl/nflhc
jshanab_wcw 15:07 windows event
taxilian 15:07 there is a WINPROC in PluginWindowWin.cpp
!findfile PluginWindowWin.cpp
FireBreathBot 15:07 Found 1 matching file(s) in the master branch. First 1 are:
src/PluginAuto/Win/PluginWindowWin.cpp http://goo.gl/NdqTe
taxilian 15:07 I'm not sure where it's confusing; it's all right there in the file
you don't see WM_ERASEBKGND because we don't handle it
don't know of any reason we'd need to
jshanab_wcw 15:07 I saw somewhere that intercepting that and returning true can reduce flicker. :-)
I added a case for it and event teh WM_NCPAINT, but a breakpoint set there does not trap
taxilian 15:07 then it isn't being fired
go look at pluginwindowwin.cpp line 77
jshanab_wcw 15:07 ok. That is weird. the windows docs must be old, the events they say I should see are not there.
taxilian 15:07 or this might just be a special type of window
we may not be getting all of those events because we're a child window, not a top level window
jshanab_wcw 15:07 There are some flags defaulting to off that can be set to get such events. (MSDN)
taxilian 15:07 ahh
I would still try adding that RefreshEvent before you get fancy
if it doesn't help, it doesn't help
but it might
it would make sense
jshanab_wcw 15:07 I tried that, it never gets called. So I am digging in a bit deeper to find an event to hook into
taxilian 15:07 wait, what?
what never gets called?
!findfile NpapiPluginWin.cpp
FireBreathBot 15:07 Found 1 matching file(s) in the master branch. First 1 are:
src/PluginAuto/Win/NpapiPluginWin.cpp http://goo.gl/rqikb
someone-noon 15:07 if i need to provide a sender for message ([fullscreenwindow orderOut:sender];) what should i pass for sender if a plugin is window less?
taxilian 15:07 someone-noone: I have no idea
jshanab_wcw 15:07 Added an else around line 130 of NpapiPluginWin.cpp to invalidate the rectangle on that setwin, but there are no spurious calls so it does nothing.
taxilian 15:07 no no no
it would never hit that
jshanab_wcw 15:07 taxilian. windows 7 may be at fault there, aparently if composite is on, some caching and reduction in paints is implemented.
taxilian 15:07 well, unless I'm misunderstanging
you need an else on line 129
to the if that starts on 119
and if that is never hit, I'll be surprised
jshanab_wcw: possible
jshanab_wcw 15:07 that is where i put the else (my line numbers may no longer line up), the else never gets hit
taxilian 15:07 interesting
on which browser?
jshanab_wcw 15:07 FF :-)
taxilian 15:07 huh. my how things change
okay
jshanab_wcw 15:07 So now my question is when/who creates the child window? maybe i can just change a flag
taxilian 15:07 the window you get from FireBreath is created by the browser
you could make your own child, though
jshanab_wcw 16:07 ok, I will sleep on it :-)
someone-noone 16:07 i need to exit somehow from fullscreen. So i want to handle "esc" pressing. If i understand right, if i will create a NSWindow and toggle it to full-screen, plugin events will not work
am i right?
taxilian 16:07 that is correct; you'll have to handle the events in the new NSWindow
someone-noone 16:07 that is good
thanks
was not sure if events will be sent to new NSWindow directly from NSApplication
taxilian 16:07 I have no idea, actually
but I know people have done full screen, so I assume there is a way
someone-noone 16:07 one more question, is that right that sendEvent is dispatching events? (i've read this in apple docs) Why i'm asking, becaues it's name is little bit strange :D
taxilian 16:07 the SendEvent I was talking about is a FireBreath API
cocoa events work a bit differently
I don't know of a single api for dispatching them
someone-noone 16:07 so in fb you're dispatching the global cocoa event or what?
taxilian 16:07 no
in FB SendEvent has nothing to do with anything that isn't FB
SendEvent is a method of PluginEventSource
and PluginWindow extends PluginEventSource
that's how things like AttachedEvent get fired
someone-noone 16:07 no no, i was asking smth else... how do you catch events? somehow from NSApplication ?
taxilian 16:07 no idea
never done it
someone-noone 16:07 ah. i thought event system was done by you :D
taxilian 16:07 parts were
but we get cocoa events directly from the browser
not through the normal event system
someone-noone 16:07 in file KeyCodesCocoa.cpp that values in CocoaConst are [event keyCodes] ?
taxilian 16:07 hmm. I think so
at least common ones