Feed for discussion Photon microGUI in project Graphics. Posts for Photon microGUI post122099: Re: PtTimer not working after 100 day usage gl shi(deleted) http://community.qnx.com/sf/go/post122099 2023-01-04T03:52:21Z 2023-01-04T03:52:21Z hi how did you fix this problem? I'm in the same situation gl shi(deleted) 2023-01-04T03:52:21Z post121593: What graphics driver for Intel Celeron Quad Core J1900 ? KOMSTER Ltd. http://community.qnx.com/sf/go/post121593 2021-09-13T12:50:27Z 2021-09-13T12:50:27Z Hi I've installed QNX 6.5 on Advantech UNO-2272G-J2AE with Intel Celeron Quad Core J1900 (Graphic Engine: Intel HD Graphic). What graphics driver should I use? I've tried devg-intelhd.so and devg-i830.so but they don't work. Only vesabios and svga are working. Best regards Waldi KOMSTER Ltd. 2021-09-13T12:50:27Z post121450: Appbuilder generates bad class table in abmain.c ralph kanzler http://community.qnx.com/sf/go/post121450 2021-06-10T02:49:40Z 2021-06-10T02:49:40Z An erosions entry is put into the class table list ‘1004”,1004 It can be commented out and build is successful. What can be done in appbuilder to correct this? ralph kanzler 2021-06-10T02:49:40Z post120653: Re: Need qwinph Package for QWindows in Photon - AKA beta.qwinph Patrick Cinq(deleted) http://community.qnx.com/sf/go/post120653 2020-05-19T23:22:28Z 2020-05-19T23:22:28Z Did someone finally got their hands on the qwinph package? still in need in 2020 plz Patrick Cinq(deleted) 2020-05-19T23:22:28Z post119826: unable to initialise io-display Kok Keong Neo(deleted) http://community.qnx.com/sf/go/post119826 2019-08-23T07:47:03Z 2019-08-23T07:47:03Z I try to initialize io-display in order to start photon but getting any error I use pci -v to make sure that the VGA display is present but I am still unable to initialize io-display What am I doing wrong here? Any suggestions? Thank you # io-display -dvid=0x8086,did=0x1912 Could not initialize device "vid=0x8086,did=0x1912": No such device Check 'sloginfo' output for more details io-display failed to initialise Class = Display (VGA) Vendor ID = 8086h, Intel Corporation Device ID = 1912h, Unknown Unknown PCI index = 0h Class Codes = 030000h Revision ID = 6h Bus number = 0 Device number = 2 Function num = 0 Status Reg = 10h Command Reg = 7h Header type = 0h Single-function BIST = 0h Build-in-self-test not supported Latency Timer = 0h Cache Line Size= 10h un-cacheable BAR - 0 [Mem] = de000000h 64bit length 16777216 enabled BAR - 2 [Mem] = c0000000h prefetchable 64bit length 268435456 enabled BAR - 4 [I/O] = f000h length 64 enabled Subsystem Vendor ID = 8086h Subsystem ID = 2015h Max Lat = 0ns Min Gnt = 0ns PCI Int Pin = INT A Interrupt line = 9 CPU Interrupt = 9h Capabilities Pointer = 40h Capability ID = 9h - Vendor Specific Capabilities = 10ch - 62016671h Capability ID = 10h - PCI Express Capabilities = 92h - 10008000h Capability ID = 5h - Message Signaled Interrupts Capabilities = 0h - 0h Capability ID = 1h - Power Management Capabilities = 22h - 0h Class = System Peripherals (Other) Vendor ID = 8086h, Intel Corporation Device ID = 1911h, Unknown Unknown PCI index = 0h Class Codes = 088000h Revision ID = 0h Bus number = 0 Device number = 8 Function num = 0 Status Reg = 10h Command Reg = 6h Header type = 0h Single-function BIST = 0h Build-in-self-test not supported Latency Timer = 0h Cache Line Size= 10h un-cacheable BAR - 0 [Mem] = df716000h 64bit length 4096 enabled Subsystem Vendor ID = 8086h Subsystem ID = 2015h Max Lat = 0ns Min Gnt = 0ns PCI Int Pin = INT A Interrupt line = 9 CPU Interrupt = 9h Capabilities Pointer = 90h Capability ID = 5h - Message Signaled Interrupts Capabilities = 0h - 0h Capability ID = 1h - Power Management Capabilities = 2h - 0h Capability ID = 13h - Unknown Capabilities = 306h - 0h Kok Keong Neo(deleted) 2019-08-23T07:47:03Z post117865: Re: Phindows Mike Lorenz http://community.qnx.com/sf/go/post117865 2017-07-12T10:18:04Z 2017-07-12T10:18:04Z Phindows is a remote desktop tool similar to VNC. It is only useabel with photon environment on the target desktop. On the target you have to run necessarily the photon desktop and photon applications. Mike Lorenz 2017-07-12T10:18:04Z post117863: Phindows V K(deleted) http://community.qnx.com/sf/go/post117863 2017-07-11T20:41:15Z 2017-07-11T20:41:15Z Hello, I've couple of questions regarding Phindows, things I cannot understand: 1) Is it just a viewer like Remote Desktop on Windows? 2) Can I get source code for Phindows? 3) By user's guide, "Phindows is a connectivity tool that lets you use Microsoft Windows platforms to connect to and interact with graphical Photon applications running on a remote Neutrino computer". Does it mean one can "convert" some not QNX-based graphical application and/or primitives to proper Photon-complying format and again display it via Phindows. Thank you! V K(deleted) 2017-07-11T20:41:15Z post117862: Re: RE: Source code for Phindows V K(deleted) http://community.qnx.com/sf/go/post117862 2017-07-11T19:53:39Z 2017-07-11T19:53:39Z Is this thread alive? Phindows source code would be very useful for me... Thank you. V K(deleted) 2017-07-11T19:53:39Z post117860: Re: issues with blink attribute for text in photon terminal Mike Lorenz http://community.qnx.com/sf/go/post117860 2017-07-10T13:43:04Z 2017-07-10T13:43:04Z Thanks for the information. That's why in devc-con it's working ? ;) The program I use has its own redrawing process for blinking text. And there was a timing issue. So it was partially working. Finally, I found a sollution. In fact, the escape sequences are not working in pterm. But that's not important for me anymore. Mike Lorenz 2017-07-10T13:43:04Z post117859: Re: issues with blink attribute for text in photon terminal Wojtek Lerch http://community.qnx.com/sf/go/post117859 2017-07-10T13:17:16Z 2017-07-10T13:17:16Z The Photon terminal does not support blinking. It does recognize the corresponding escape sequences that libqnxterm sends to it, and even stores a "blinking" bit in its internal attributes, but there's no code in there to periodically find all the characters marked as "blinking" and redraw them with different colours. > Update: > I figured out, that libqnxterm is not capable using the blink attribute. It > seems there's no direct connection of the framebuffer of the library and the > pseudo terminal of photon . The program I use has an process which is > responsible for active blinking. So there was a timing issue responsible for > the lost of the blinking text . Wojtek Lerch 2017-07-10T13:17:16Z post117858: Re: issues with blink attribute for text in photon terminal Mike Lorenz http://community.qnx.com/sf/go/post117858 2017-07-10T11:18:23Z 2017-07-10T11:18:23Z Update: I figured out, that libqnxterm is not capable using the blink attribute. It seems there's no direct connection of the framebuffer of the library and the pseudo terminal of photon . The program I use has an process which is responsible for active blinking. So there was a timing issue responsible for the lost of the blinking text . Mike Lorenz 2017-07-10T11:18:23Z post117836: issues with blink attribute for text in photon terminal Mike Lorenz http://community.qnx.com/sf/go/post117836 2017-06-29T14:49:13Z 2017-06-29T14:49:13Z Hi photon experts, I have an issue with showing blinking text in a terminal application in Photon environment. The program was ported from QNX4 to QNX6.50SP1 using the library "libqnxterm.a" . It was programmed for normal console at first . Since QNX4 it is running in a simple photon-app which uses the photon-widget "PtTty" with QNX4 terminal protocol (TERM=qnxm) . Changing the background color and foreground color works fine. Setting the blink attribute for term_type-function doesn't cause the text to blink . By using the debugger I can see that in the global structure term_state the attribute for the text was changed in scrbuf . Testing with pterm: 1. Changing manually the blink attribute for text by using an escape sequence " echo "\033{" " (termcap for qnxm-environment) even doesn't make the text blink in pterm using devc-pty. The background color is changed to grey instead! 2. A second program with almost the same sources as the first program shows blinking text, but only when the size of the pterm window is set to the same char dimension as the program. 3. A third simple test program writing some text with attributes with term_type doesn't show blinking text in pterm windows. The other attributes like underine , highlight and inverse are working. Testing with console: 1. Blinking text works for devc-con-hid with escape sequence as well as with the test-program using libqnxterm. Do you have any ideas ? Thanks in advance Mike Lorenz 2017-06-29T14:49:13Z post117735: photon on beaglebone black jon w(deleted) http://community.qnx.com/sf/go/post117735 2017-05-16T11:50:01Z 2017-05-16T11:50:01Z Hi Florian, I know its an old post but hoping you can remember... was there anything else you had todo to get the 4dcape working? Mine just shows a white screen, I have used you configuration files with no luck... jon w(deleted) 2017-05-16T11:50:01Z post117446: Re: On screen keyboard Thomas Haupt http://community.qnx.com/sf/go/post117446 2017-02-24T15:14:02Z 2017-02-24T15:14:02Z Wow -- nice things coming from a far past! Glad it helped you, and thanks for making my week! Best regards, Thomas Thomas Haupt 2017-02-24T15:14:02Z post117445: Re: On screen keyboard Nebojša Balatov http://community.qnx.com/sf/go/post117445 2017-02-24T14:25:54Z 2017-02-24T14:25:54Z I hope you will see this message after so many years have passed: Thank you very, very much, mister Thomas! Your application saved a lot of my time and effort! Nebojša Balatov 2017-02-24T14:25:54Z post115784: create tracking system. Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115784 2016-02-18T04:54:31Z 2016-02-18T04:54:31Z Hi everyone, I want to make an ATC display, I want to make for the first time 5 widget is created. when the 6th widget is created, widget number 1 will dissappear and 7th widget is created the widget number 2 will dissappear and so on for tracking system. do you know how the correct "if " condition? thank you best regards afif. Afif Grahaditya(deleted) 2016-02-18T04:54:31Z post115740: Re: create dialog and insert to the callback. Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115740 2016-02-16T01:49:57Z 2016-02-16T01:49:57Z Hi, I already create the window in my PhAB, now I want to link the window that I already create in PhAB with callback activate. I already try to use your advice but there's error "my window is not declared" thank you best regards afif. Afif Grahaditya(deleted) 2016-02-16T01:49:57Z post115738: Re: Zoom using Ptimagearea Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115738 2016-02-15T15:19:38Z 2016-02-15T15:19:38Z Hi thank you for replying.. I don't understand "The zooming factor, expressed as a fixed-point 16.16 number." part.. can you explain to me about it? because I want to adjust the number of zoom using slider. thank you best regards afif Afif Grahaditya(deleted) 2016-02-15T15:19:38Z post115737: Re: create dialog and insert to the callback. Fedor Zharov(deleted) http://community.qnx.com/sf/go/post115737 2016-02-15T15:17:33Z 2016-02-15T15:17:33Z Hi Afif, you can use PtAddCallback and PtCreateWidget or ApCreateModule. E.g. for a button: PtAddCallback( ABW_Button, Pt_CB_ACTIVATE, button_cb, NULL ); int button_cb( PtWidget_t *widget, void *data, PtCallbackInfo_t *info) { ApCreateModule( ABM_mydialog, NULL, info ); return Pt_CONTINUE; } For more information please read about PtAddCallback, PtCreateWidget and ApCreateModule: http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.photon_lib_ref%2Fpt%2Fptaddcallbacks.html&cp=17_1_13_1 http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.photon_lib_ref%2Fap%2Fapcreatemodule.html&cp=17_1_4_8 http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.photon_lib_ref%2Fpt%2Fptcreatewidget.html&cp=17_1_13_101 Best regards, Fedor Fedor Zharov(deleted) 2016-02-15T15:17:33Z post115736: Re: Zoom using Ptimagearea Fedor Zharov(deleted) http://community.qnx.com/sf/go/post115736 2016-02-15T14:35:23Z 2016-02-15T14:35:23Z Hi Afif, you can use PtSetResource with Pt_ARG_IMAGEAREA_ZOOM. E.g. PtSetResource(ABW_Image_for_zoom, Pt_ARG_IMAGEAREA_ZOOM, zoom, 0 ); For more information please read: http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.photon_widget_ref%2Fptimagearea.html&cp=17_2_2_31 Best regards, Fedor Fedor Zharov(deleted) 2016-02-15T14:35:23Z post115731: create dialog and insert to the callback. Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115731 2016-02-12T07:56:54Z 2016-02-12T07:56:54Z Hi Everyone, Do you know how to create dialog and insert it to activate callback in a widget using code? or Do you know how to insert menu / dialog that I already create in phAB to callback using code? what should command I need to use? Thank you Best Regards Afif Afif Grahaditya(deleted) 2016-02-12T07:56:54Z post115724: Zoom using Ptimagearea Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115724 2016-02-11T03:30:08Z 2016-02-11T03:30:08Z Hi everyone I am try to zoom picture in directory using ptimagearea. does anyone have an example program/ sample program, how to make zoom picture using ptimagearea?? thank you Best Regards Afif. Afif Grahaditya(deleted) 2016-02-11T03:30:08Z post115699: Re: C++ with Photon GUI Thomas Haupt http://community.qnx.com/sf/go/post115699 2016-02-09T11:07:13Z 2016-02-09T11:07:13Z Hi Pawel (sorry, missing the correct key on my keyboard...), I assume your problems originate in PhAB (the Photon Application Builder tool) not originally knowing that you intend to make a C++ application. As you probably have already noticed, PhAB will create a number of source files for you. It also creates "stubs" functions for callbacks you defined for different widgets. It is important (or at least, easiest) if PhAB can know you want to do C++ _before it generates all the code for the first time_. The easiest way to do so is by telling PhAB to place the stub functions in files with the suffix ".cc". PhAB will automatically recognize this and generate (almost all) the rest accordingly. It will even generate an "abmain.cc" instead of "abmain.c". When defining callback (or other) functions in PhAB, you can use different special notations. They are documented under: http://www.qnx.com/developers/docs/6.5.0SP1.update/index.html#./com.qnx.doc.photon_prog_guide/code.html#FunctionFileNames So assume you have a button widget and add an "activate" callback, then... - naming the callback "btn_act@cb.cc" will add a C callback stub "btn_act()" to "cb.cc" and create the file if necessary - naming the callback "btn::act@cb.cc" will add a stub member function "btn::act()" to "cb.cc" and create the file if necessary ... All of these methods will tell PhAB that you're planning to do C++, and let it act appropriately. There's one potential problem, though -- PhAB will (by default) also try to auto-generate a file named "proto.h" with prototypes of all non-static functions in your project. The prototype generator is not C++-aware, which will likely cause your class methods to appear in "proto.h" and cause compiler errors in various source files. I usually opt to disable prototype generation and manage the prototyping manually. To disable auto-prototyping, open the "Project" menu in PhAB and select "Properties". In the "Project Properties" dialog, go to the "Generate Options" tab and un-check "Scan Source Files for Prototypes". Attached is a small example project that uses a class "ball_c" to manage an arbitrary number of balls moving across the window and can be added/deleted on the fly. Hope this helps a bit. Kind regards, Thomas Thomas Haupt 2016-02-09T11:07:13Z post115698: Re: Aplication terminated when 2 script active at the same time. Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115698 2016-02-09T08:02:22Z 2016-02-09T08:02:22Z Hi Mr. Thomas. the arrays (my_label[ ] and my_label2[ ]) size is 5, it's already in global variable so it doesn't need to initalize. the a and b variable is for keep the tail of the widget is 5. I want to make it as Air trafic control, the widget is a plane.. can you explain to me more? I don't understand your advice. thank you. best regards afif. Afif Grahaditya(deleted) 2016-02-09T08:02:22Z post115697: Re: Aplication terminated when 2 script active at the same time. Thomas Haupt http://community.qnx.com/sf/go/post115697 2016-02-09T07:35:06Z 2016-02-09T07:35:06Z Afif, unfortunately, the code and information you posted doesn't tell the whole story. One thing sticking out, though, is that you seem to use two arrays of widget pointers (my_label[] and my_label2[]) and two indices into these arrays (a and b) which keep being incremented on every timer tick. I don't know the exact sizes of the arrays, but letting the indices increase without bounds seems like a bad idea no matter how large the arrays are - sooner or later, you'll always be using "entries" beyond the array boundaries and will experience all kinds of effects. Also, since PtUnrealizeWidget() doesn't actually delete the widget object, you currently keep piling up unrealized widgets in the background. That's not what makes the application crash, but it causes a memory leak and will deteriorate the GUI's performance over time. Personally, I'd suggest using two arrays of six entries each. Create (and if possible, also realize) the widgets only once at startup time. Then, at each timer tick, re-calculate every widget's position and use PtSetResource() to set the Pt_ARG_POS resource of the widgets. That way, you can just move the existing widgets around instead of creating new ones every time. Regards, Thomas Thomas Haupt 2016-02-09T07:35:06Z post115696: Re: C++ with Photon GUI Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115696 2016-02-09T04:05:06Z 2016-02-09T04:05:06Z are you sure you can use C++ in photon GUI?? I thought you can only use C in photon GUI. that's why the format of callback is .c (format for C in momentics) not .cc (format for C++ in momentics) Afif Grahaditya(deleted) 2016-02-09T04:05:06Z post115695: Aplication terminated when 2 script active at the same time. Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115695 2016-02-09T04:02:17Z 2016-02-09T04:02:17Z Hi everyone. as you can see in the video that I attached in this email, there are 2 buttons to activate 2 scripts. the "OK" button used for activate timer.c, the timer.c is for create widget and move it horizontal and the other is for activate btn_psr.c, btn_psr.c is for create widget and move it vertical When I press the button one by one ( click the button, restart the application, and click the other button) it's work fine. But when I click both button in the same time (without restart the application),the vertical widget is work fine, but after the sixth time horizontal widget is created the application is terminate. do you know the reason why? is there something in my source code that make it happen? thank you best regards Afif Grahaditya(deleted) 2016-02-09T04:02:17Z post115693: Re: Zoomer tool using PtSlider Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115693 2016-02-09T02:47:15Z 2016-02-09T02:47:15Z 1. I am get trouble with PtSlider, I want to use it for create zoom bar with it 2. I want to use PtSlider because I thought it was easier to use for user just click and drag. thank you best regards. afif Afif Grahaditya(deleted) 2016-02-09T02:47:15Z post115680: Re: Zoomer tool using PtSlider Thomas Haupt http://community.qnx.com/sf/go/post115680 2016-02-05T10:45:56Z 2016-02-05T10:45:56Z Hello Afif, unfortunately your question is a bit too unspecific to be answered right away. Two questions: - Are you having any troubles with the PtSlider widget, or is the zooming your main concern? - What is it you are trying to zoom? If it is just an image, I'd suggest using PtImageArea, which can be used to display images and automatically supports zooming and panning. Kind regards, Thomas Thomas Haupt 2016-02-05T10:45:56Z post115679: Zoomer tool using PtSlider Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115679 2016-02-05T08:53:20Z 2016-02-05T08:53:20Z Good afternoon everyone, I want to make a zoomer tool by using PtSlider for my application. what I need and how I make it? Thank you Best Regards Afif. Afif Grahaditya(deleted) 2016-02-05T08:53:20Z post115582: Photon and ARMv7 mario sangalli http://community.qnx.com/sf/go/post115582 2016-01-21T14:15:05Z 2016-01-21T14:15:05Z Hy, I' have seen Photon isn't supported on ARMv7 targets: anyway in the 6.5 OS version uder ARMv7 /usr/photon binary are present: this means that it can be used, also whitout any official support? We plan to port some application from ppc to an iMX6, but iMX6 grahic driver in qnx 6.5 is missing : only screen driver is available for 6.6 release. The screen driver can works with Photon? Photon at this time seems to be dead : to port application from ppc architecture to iMX6 will requires a complete rewrite using QT and such is big effort. There is a way to port Photon on ARMv7 ? If Photon is dead, there is a hope that its sources will be released to community? any other suggestion? Thanks M. Sangalli mario sangalli 2016-01-21T14:15:05Z post115510: Re: create and delete widget Fedor Zharov(deleted) http://community.qnx.com/sf/go/post115510 2016-01-14T09:58:02Z 2016-01-14T09:58:02Z Hi Afif, > my script is like this : > > my_image= PxLoadImage("/home/PSR.jpg",NULL); > my_label=PtCreateWidget(PtLabel,Pt_NO_PARENT,1,args); > PtSetResource( ABW_my_label, Pt_ARG_LABEL_IMAGE, my_image, 0 ); > > but it's error because my_label is not define. what should I do? > > Thank you. PtLabbel requires parent widget. For more information please read: http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.photon_prog_guide%2Fnonphab.html&cp=17_0_27 http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.photon_lib_ref%2Fpt%2Fptcreatewidget.html&cp=17_1_13_101 http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.photon_lib_ref%2Fpt%2Fptsetparentwidget.html&cp=17_1_13_228 > and I get error Pxloadimage is undefined. > > does anyone know the reason? > > thank you You have to include phexlib library in your common.mk. E.g. LIBS += phexlib Best regards, Fedor Fedor Zharov(deleted) 2016-01-14T09:58:02Z post115490: Re: create and delete widget Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115490 2016-01-13T04:18:17Z 2016-01-13T04:18:17Z and I get error Pxloadimage is undefined. does anyone know the reason? thank you Afif Grahaditya(deleted) 2016-01-13T04:18:17Z post115489: Re: create and delete widget Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115489 2016-01-13T01:52:06Z 2016-01-13T01:52:06Z my script is like this : my_image= PxLoadImage("/home/PSR.jpg",NULL); my_label=PtCreateWidget(PtLabel,Pt_NO_PARENT,1,args); PtSetResource( ABW_my_label, Pt_ARG_LABEL_IMAGE, my_image, 0 ); but it's error because my_label is not define. what should I do? Thank you. Afif Grahaditya(deleted) 2016-01-13T01:52:06Z post115473: Re: create and delete widget Fedor Zharov(deleted) http://community.qnx.com/sf/go/post115473 2016-01-12T10:11:08Z 2016-01-12T10:11:08Z You can use PxLoadImage() and then PtSetResource() with Pt_ARG_LABEL_IMAGE flag. E.g. PhImage_t *my_image; my_image = PxLoadImage(“/home/my_pict.jpg”, NULL); PtSetResource( ABW_my_label, Pt_ARG_LABEL_IMAGE, my_image, 0 ); For more information please read following help topics about PtLabel and PhImage_t: http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.photon_widget_ref%2Fptlabel.html&cp=17_2_2_32 and http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.photon_lib_ref%2Fph%2Fphimage_t.html&cp=17_1_9_55 . Best regards, Fedor Fedor Zharov(deleted) 2016-01-12T10:11:08Z post115471: Re: create and delete widget Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115471 2016-01-12T01:28:24Z 2016-01-12T01:28:24Z I don't understand how to use the code, I want to create an image as label and the picture is in my directory. Afif Grahaditya(deleted) 2016-01-12T01:28:24Z post115454: Re: create and delete widget Fedor Zharov(deleted) http://community.qnx.com/sf/go/post115454 2016-01-11T08:45:12Z 2016-01-11T08:45:12Z Hi Afif, Please specify what do you mean by script: shell script or program code? There are two basic ways to create a widget: using Photon Application Builder (PhAB) or using c/c++ code in your program. For PhAB see: http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.photon_prog_guide%2Fwidgets.html&cp=17_0_6 For code see: http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.photon_prog_guide%2Fwgt_code.html&cp=17_0_12 Best regards, Fedor Fedor Zharov(deleted) 2016-01-11T08:45:12Z post115453: create and delete widget Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115453 2016-01-11T06:40:55Z 2016-01-11T06:40:55Z hello everyone, I am new in GUI, how to create and delete widget using script ? thank you. best regards afif Afif Grahaditya(deleted) 2016-01-11T06:40:55Z post115135: Re: Web client Fedor Zharov(deleted) http://community.qnx.com/sf/go/post115135 2015-11-27T11:41:25Z 2015-11-27T11:41:25Z Hi Afif, Please try following code: PtArg_t args[1]; int *error; PtSetArg( &args[0], Pt_ARG_WEB_SERVER, "online", 0); PtSetResources( ABW_PtWebClient1, 1, args ); PtSetResource( ABW_PtWebClient1, Pt_ARG_WEB_GET_URL, "www.qnx.com", Pt_WEB_ACTION_DISPLAY); Also check configuration file /etc/photon/webservers. It should contain a line for Pt_ARG_WEB_SERVER. E.g. online = /opt/mozilla/firefox/bin/run-mozilla.sh /opt/mozilla/firefox/bin/mozserver,MozillaServer Best regards, Fedor Fedor Zharov(deleted) 2015-11-27T11:41:25Z post115127: Re: tutorial using Pt_ARG_POS and ptcreatewidget Fedor Zharov(deleted) http://community.qnx.com/sf/go/post115127 2015-11-26T13:04:01Z 2015-11-26T13:04:01Z Hi Afif, You can create a widget once and then move it with PtSetResource(widget, Pt_ARG_POS, &pos, 0); E.g. PhPoint_t pos; pos.x = x; pos.y = y; PtSetResource(widget, Pt_ARG_POS, &pos, 0); Best regards, Fedor Fedor Zharov(deleted) 2015-11-26T13:04:01Z post115126: Re: tutorial give variable to widget Fedor Zharov(deleted) http://community.qnx.com/sf/go/post115126 2015-11-26T12:55:29Z 2015-11-26T12:55:29Z Hi Afif, You can get a string from your widget and convert it to integer type with PtGetResource(). E.g. PtGetResource(ABW_my_widget, Pt_ARG_TEXT_STRING, &my_string, 0); my_int = atoi(my_string); Also, if you need only integers, you can use PtNumericInteger. Best regards, Fedor Fedor Zharov(deleted) 2015-11-26T12:55:29Z post115098: tutorial using Pt_ARG_POS and ptcreatewidget Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115098 2015-11-24T03:29:01Z 2015-11-24T03:29:01Z excuse me I want to make widget move using pt_arg_pos from 1 point to other point using arg_pos and createwidget.. do you know how to make the script?? thanks Afif Grahaditya(deleted) 2015-11-24T03:29:01Z post115065: tutorial give variable to widget Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115065 2015-11-19T06:38:34Z 2015-11-19T06:38:34Z good afternoon all.. I have a problem i want to give variable to 3 multi text widget, so if I type "15","20" and "30" on it, then it will become variable for equation: x=id1+(im1/60)+(is1/3600); can you tell me how to do it? sorry for my bad english and Thank you .. Afif Grahaditya(deleted) 2015-11-19T06:38:34Z post115031: Re: Web client Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115031 2015-11-17T04:11:30Z 2015-11-17T04:11:30Z > I have a problem in using photon.. > > I want to ask how to make web client widget to open a web (ex:google.com) > automatically when the GUI start? > > I can't use Pt_ARG_WEB_GET_URL. > > Thanks. here the script.. { PtArg_t args[ 2 ]; char tmp[300]; sprintf(tmp,"file:///home/google.html"); PtSetArg( &args[0], Pt_ARG_WEB_SERVER, "vserver", 0 ); PtSetResources( ABW_web, 1, args ); PtSetArg(&args[0],Pt_ARG_WEB_GET_URL,tmp , Pt_WEB_ACTION_DISPLAY ); PtSetResources( ABW_web, 1, args); PtSetArg( &args[0],Pt_ARG_WEB_GET_URL, "www.google.com",Pt_WEB_ACTION_DISPLAY); PtSetResources( ABW_web, 1, args ); return( Pt_CONTINUE ); } why when I run the html file can''t be load. I already link web start and web URL to the script above.. thanks ^_^ Afif Grahaditya(deleted) 2015-11-17T04:11:30Z post115030: Re: Web client Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115030 2015-11-17T04:10:36Z 2015-11-17T04:10:36Z here the script.. { PtArg_t args[ 2 ]; char tmp[300]; sprintf(tmp,"file:///home/google.html"); PtSetArg( &args[0], Pt_ARG_WEB_SERVER, "vserver", 0 ); PtSetResources( ABW_web, 1, args ); PtSetArg(&args[0],Pt_ARG_WEB_GET_URL,tmp , Pt_WEB_ACTION_DISPLAY ); PtSetResources( ABW_web, 1, args); PtSetArg( &args[0],Pt_ARG_WEB_GET_URL, "www.google.com",Pt_WEB_ACTION_DISPLAY); PtSetResources( ABW_web, 1, args ); return( Pt_CONTINUE ); } why when I run the html file can''t be load. I already link web start and web URL to the script above.. thanks ^_^ Afif Grahaditya(deleted) 2015-11-17T04:10:36Z post115028: Web client Afif Grahaditya(deleted) http://community.qnx.com/sf/go/post115028 2015-11-17T02:46:24Z 2015-11-17T02:46:24Z I have a problem in using photon.. I want to ask how to make web client widget to open a web (ex:google.com) automatically when the GUI start? I can't use Pt_ARG_WEB_GET_URL. Thanks. Afif Grahaditya(deleted) 2015-11-17T02:46:24Z post113915: Re: System hanging with devi-hid on i7 smp - QNX 6.5 Philippe Elskens http://community.qnx.com/sf/go/post113915 2015-06-03T08:31:47Z 2015-06-03T08:31:47Z Hi Oleg On our application we are using touch screen and mouse. These devices are connected on usb. At boot time my system starts : io-hid -d ps2ser kbd:kbddev:ps2mouse:mousedev -d usb /dev/io-usb/io-usb and if later I start "devi-hid mouse touch" .... the system hang But now if I slay the driver io-hid and restart it (in rc.local for instance) with the following command: io-hid -d usb /dev/io-usb/io-usb I can start "devi-hid mouse touch" and it works fine. I'll also try your suggestion Thanks Philippe Elskens 2015-06-03T08:31:47Z post113914: Re: System hanging with devi-hid on i7 smp - QNX 6.5 Oleg Bolshakov http://community.qnx.com/sf/go/post113914 2015-06-03T08:11:48Z 2015-06-03T08:11:48Z Hi Philippe, To boot with SMP kernel you have to build boot image in which io-hid and devc-con-hid both launch on the same CPU core. To do this you should use on -C0, for example: on -C0 /proc/boot/io-hid -dusb /dev/io-usb/io-usb waitfor /dev/io-hid/io-hid on -C0 /proc/boot/devc-con-hid -n5 & reopen /dev/con1 Let me know how it works on your configuration. Respectfully, Oleg 28 мая 2015 г., в 11:52:30, Philippe Elskens <community-noreply@qnx.com> написал: > Hello, > Have you experienced problems with iNTEL i7 / Q77 devi-hid driver in SMP configuration. > If we start ph utility, system hangs at "Waiting for input driver" displaying login windows. > If we start photon manually (actually : io-display, io-graphics, pwm, bkgdmgr , etc) all works fine until we try to start "devi-hid mouse". At this time the system hangs. > > If we don't start the SMP kernel, we don't have this kind of problem (ph starts without any problem) > > Any idea ? > > > > _______________________________________________ > > Photon microGUI > http://community.qnx.com/sf/go/post113868 > To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Oleg Bolshakov 2015-06-03T08:11:48Z post113868: System hanging with devi-hid on i7 smp - QNX 6.5 Philippe Elskens http://community.qnx.com/sf/go/post113868 2015-05-28T08:52:30Z 2015-05-28T08:52:30Z Hello, Have you experienced problems with iNTEL i7 / Q77 devi-hid driver in SMP configuration. If we start ph utility, system hangs at "Waiting for input driver" displaying login windows. If we start photon manually (actually : io-display, io-graphics, pwm, bkgdmgr , etc) all works fine until we try to start "devi-hid mouse". At this time the system hangs. If we don't start the SMP kernel, we don't have this kind of problem (ph starts without any problem) Any idea ? Philippe Elskens 2015-05-28T08:52:30Z post112812: Re: Can't start Phab Zhiyang Cai(deleted) http://community.qnx.com/sf/go/post112812 2015-01-05T08:30:52Z 2015-01-05T08:30:52Z I can open phab on momentics IDE with the same project several months ago. And I do not execute any special step. I just select the project, click phab on the IDE. Then PhAB crashes. The version of QNX Momentics IDE is 4.6 and QNX version is 6.4.1 Zhiyang Cai(deleted) 2015-01-05T08:30:52Z post112310: Graphics driver for Intel Atom E6xx (Tunnel Creek) Andrey Kovalenko http://community.qnx.com/sf/go/post112310 2014-11-11T10:16:54Z 2014-11-11T10:16:54Z Hi all, I have Lippert CoreExpress ECO2 based on Intel Atom E6xx series processor. I am using "Intel Crown Bay BSP" with QNX 6.5.1, and in general it works well. But there are no any devg-* driver. The "pci" utility shows two graphics controllers on board: ... Class = Display (VGA) Vendor ID = 8086h, Intel Corporation Device ID = 4108h, Tunnel Creek Integrated Graphics Controller ... Class = Multimedia (Video) Vendor ID = 8086h, Intel Corporation Device ID = 8182h, Tunnel Creek Integrated Graphics Controller ... I have succesfully started the general driver "vesabios", but I want to use an accelerated driver instead, if at all possible. So I have several questions: 1) What device I should use? 4108 or 0x8182? What are the differencies between them, because I didn't find any? 2) Where can I find an accelerated driver? Andrey Kovalenko 2014-11-11T10:16:54Z post112188: Re: Can't start Phab Gleb Krylov(deleted) http://community.qnx.com/sf/go/post112188 2014-10-28T09:06:58Z 2014-10-28T09:06:58Z Hi, Please describe your problem step by step. How do you connect to your target system? Which version of the IDE and QNX are you using? I'll try to reproduce your problem... Regards, Gleb. Gleb Krylov(deleted) 2014-10-28T09:06:58Z post112070: Can't start Phab Zhiyang Cai(deleted) http://community.qnx.com/sf/go/post112070 2014-10-20T08:45:53Z 2014-10-20T08:45:53Z Phab could start normally before. But now it does not work. I have not change any configuration. When I click start Phab button, Console for PhAB prints: "[7424] phfont: init... phfont:initialized. phfont:'tcp:127.0.0.1:4870[<32|64>]' server installed. Starting Photon server... [2492] Starting Phindows... [3964] Starting Window Manager... [4244] Running appbuilder.exe... [6620] PhAB exited abnormally. Photon will not be shut down. [6620] appbuilder.exe exited (0) " The project can open PhAB on another PC normally. I have reinstalled the IDE many times. The problem still exists. Zhiyang Cai(deleted) 2014-10-20T08:45:53Z post111765: Re: RE: Phablang to export data Martin Hollingsworth http://community.qnx.com/sf/go/post111765 2014-09-17T15:11:39Z 2014-09-17T15:11:39Z Hi Wojtek, thanks for the info. I have read that document so many times and every time skipped that section, that I effectively forgot about it. Greetings, Martin Martin Hollingsworth 2014-09-17T15:11:39Z post111742: RE: Phablang to export data Wojtek Lerch http://community.qnx.com/sf/go/post111742 2014-09-16T17:24:56Z 2014-09-16T17:24:56Z Nothing like that is built into phablang, but there is an API that you could use to write your own utility to convert translation files to a format of your choice and back: http://www.qnx.com/developers/docs/6.4.1/photon/prog_guide/languages.html#TranslationAPI > -----Original Message----- > From: Martin Hollingsworth [mailto:community-noreply@qnx.com] > Sent: Tuesday, September 16, 2014 11:59 AM > To: photon-graphics > Subject: Phablang to export data > > Hi folks, I have a small follow up question to the above topic. > Does phablang support the export of the translation files into different file > types, for example an export of all strings to a Microsoft Excel file, or maybe > an XML file or something similar? I need some easy for humans to read file > type for the management. > Are there maybe some shell commands for that? Unfortunately I can't find > any documentation of possible shell commands for phablang. > Thanks and greetings, > Martin > > > > _______________________________________________ > > Photon microGUI > http://community.qnx.com/sf/go/post111738 > To cancel your subscription to this discussion, please e-mail photon-graphics- > unsubscribe@community.qnx.com Wojtek Lerch 2014-09-16T17:24:56Z post111738: Phablang to export data Martin Hollingsworth http://community.qnx.com/sf/go/post111738 2014-09-16T15:58:37Z 2014-09-16T15:58:37Z Hi folks, I have a small follow up question to the above topic. Does phablang support the export of the translation files into different file types, for example an export of all strings to a Microsoft Excel file, or maybe an XML file or something similar? I need some easy for humans to read file type for the management. Are there maybe some shell commands for that? Unfortunately I can't find any documentation of possible shell commands for phablang. Thanks and greetings, Martin Martin Hollingsworth 2014-09-16T15:58:37Z post111300: Re: How to use " Photon microGUI " to show a seires of pictures? Alexander Ponomarev http://community.qnx.com/sf/go/post111300 2014-08-04T13:54:56Z 2014-08-04T13:54:56Z Hi, Robort. The process of creating the animation is described in the official documentation. Here is the link: http://www.qnx.com/developers/docs/6.5.0/topic/com.qnx.doc.photon_prog_guide/draw.html?cp=17_0_19_8#Animation Regards, Alexander. > Now I am using PtImageArea to show a series of pictures .And I find that only > when I allocate new memory for all pictures and whitout free any of them ,the > program can run. > > If I free a pictures memory of reuse any piece of it , the program failed > Alexander Ponomarev 2014-08-04T13:54:56Z post111275: Re: ApSetTranslation() ignores language regionalization Martin Hollingsworth http://community.qnx.com/sf/go/post111275 2014-07-31T06:10:14Z 2014-07-31T06:10:14Z Hi Alex, thanks for verifying this bug. Greetings, Martin Martin Hollingsworth 2014-07-31T06:10:14Z post111266: Re: ApSetTranslation() ignores language regionalization Alexander Ponomarev http://community.qnx.com/sf/go/post111266 2014-07-30T13:10:33Z 2014-07-30T13:10:33Z Hi, Martin. I have reproduced this behavior in QNX 6.4.1. But in QNX 6.5.0 algorithm working as intended. Regards, Alexander. > Hi folks, > I have a Photon GUI running QNX OS 6.4.1. I use the QNX Translation mechanism > for different languages. > During application initialization I use this command to initialize the > language of my GUI: > > int res = ApSetTranslation("de_DE") // for German language in Germany. > > This returns 0 for success and loads the language file from the set path of > ABLPATH=/usr/photon/translations which results in the file path of: > ABLPATH=/usr/photon/translations/myapplication.de_DE > > This mechanism works fine with several languages, as long as I don't seperate > between regional versions of one language. As soon as I try to seperate > between "de_DE" and "de_CH" I always get the return value "0" for success, but > the language file "de_DE" is always loaded. > > Example: I have the language files: "myapplication.de_DE" and "myapplication. > de_CH". In this case with ApSetTranslation("de_CH") still the "de_DE" language > file is loaded. > > But if I delete the "de_DE" file from harddrive, the application loads "de_CH" > instead. The same behaviour was verified using "fr_FR" and "fr_CA". > > I assume there must be something going wrong with the best match algorithm > described here in the documentation, unfortunately I can't find out what. > http://www.qnx.com/developers/docs/6.3.2/photon/prog_guide/languages.html# > RunningYourApplication > > So if anybody has a great idea how to solve this mystery your help is really > appreciated!! > Thanks and Greetings, > Martin H. Alexander Ponomarev 2014-07-30T13:10:33Z post111250: Re:RE: Re:RE: A question about PtDamageWidget Xiang Lu http://community.qnx.com/sf/go/post111250 2014-07-29T08:00:56Z 2014-07-29T08:00:56Z Thank you very much,it's ok now:) ------------------ Original ------------------ From: "Thomas Haupt";<community-noreply@qnx.com>; Date: Tue, Jul 29, 2014 03:50 PM To: "'photon-graphics@community.qnx.com'"<photon-graphics@community.qnx.com>; Subject: RE: Re:RE: A question about PtDamageWidget Hi, the problem was that you didn’t call PtDamageWidget() on the raw widget you created in PhAB; instead, a local static widget pointer ‘raw’ was used in data_update.c . You’ll need to call the damage function on ‘ABW_raw’ as shown below, then everything works just fine. Remember: When you create a widget in PhAB and give it a name, e.g., ‘blah’, then that widget will be addressable as ‘ABW_blah’ in your code. Kind regards, Thomas /* Y o u r D e s c r i p t i o n */ /* AppBuilder Photon Code Lib */ /* Version 2.03 */ /* Standard headers */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> /* Local headers */ #include "ablibs.h" #include "abimport.h" #include "proto.h" int a; char sbuf[256]; <<< static PtWidget_t *raw; PhRect_t rect; int data_update( PtWidget_t *raw, ApInfo_t *apinfo, PtCallbackInfo_t *cbinfo ) { char sbuf[256]; /* eliminate 'unreferenced' warnings */ raw = raw, apinfo = apinfo, cbinfo = cbinfo; a++; <<< PtDamageWidget(raw); >>> PtDamageWidget(ABW_raw); <<< PtFlush(); <<< usleep(10000); return( Pt_CONTINUE ); } From: 413488699 [mailto:community-noreply@qnx.com] Sent: Dienstag, 29. Juli 2014 09:25 To: photon-graphics Subject: Re:RE: A question about PtDamageWidget Thx for reply, I write a simple case, the drawfunction didn't invoke actually. In this case, I want to draw a new line each time, the code is here. ------------------ Original ------------------ From: "Thomas Haupt";<community-noreply@qnx.com>; Date: Tue, Jul 29, 2014 03:16 PM To: "'photon-graphics@community.qnx.com'"<photon-graphics@community.qnx.com>; Subject: RE: A question about PtDamageWidget Hi, sounds a bit odd - ordinarily, I'd expect PtDamageWidget() to cause the draw function being invoked. Are you sure it isn't called, or could it be you just got something in the drawing code wrong (e.g., bad translation, missing flush...)? Did you check with a debugger/log message when the draw function gets called? Can you perhaps post a small test case? Cheers, Thomas -----Original Message----- From: Xiang Lu [mailto:community-noreply@qnx.com] Sent: Dienstag, 29. Juli 2014 09:07 To: photon-graphics Subject: A question about PtDamageWidget Hi, i'm new to Photon developing and I have a problem with my app. I'm trying to use a PtRaw widget to display some graphic made with Photon functions such as PgDrawPolygon, etc. I want to make the raw widget damaged (redrawn) every 1000ms with a timer. In the timer's callback,I call PtDamageWidget(raw) to damage the PtRaw Widget and invoke the drawfunction.But after running it,I found PtDamageWidget() didn't invoke the drawfuntion.Does anyone know the reason,thanks in advance. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post111246 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post111247 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Xiang Lu 2014-07-29T08:00:56Z post111249: RE: Re:RE: A question about PtDamageWidget Thomas Haupt http://community.qnx.com/sf/go/post111249 2014-07-29T07:50:23Z 2014-07-29T07:50:23Z Hi, the problem was that you didn't call PtDamageWidget() on the raw widget you created in PhAB; instead, a local static widget pointer 'raw' was used in data_update.c . You'll need to call the damage function on 'ABW_raw' as shown below, then everything works just fine. Remember: When you create a widget in PhAB and give it a name, e.g., 'blah', then that widget will be addressable as 'ABW_blah' in your code. Kind regards, Thomas /* Y o u r D e s c r i p t i o n */ /* AppBuilder Photon Code Lib */ /* Version 2.03 */ /* Standard headers */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> /* Local headers */ #include "ablibs.h" #include "abimport.h" #include "proto.h" int a; char sbuf[256]; <<< static PtWidget_t *raw; PhRect_t rect; int data_update( PtWidget_t *raw, ApInfo_t *apinfo, PtCallbackInfo_t *cbinfo ) { char sbuf[256]; /* eliminate 'unreferenced' warnings */ raw = raw, apinfo = apinfo, cbinfo = cbinfo; a++; <<< PtDamageWidget(raw); >>> PtDamageWidget(ABW_raw); <<< PtFlush(); <<< usleep(10000); return( Pt_CONTINUE ); } From: 413488699 [mailto:community-noreply@qnx.com] Sent: Dienstag, 29. Juli 2014 09:25 To: photon-graphics Subject: Re:RE: A question about PtDamageWidget Thx for reply, I write a simple case, the drawfunction didn't invoke actually. In this case, I want to draw a new line each time, the code is here. ------------------ Original ------------------ From: "Thomas Haupt";<community-noreply@qnx.com<mailto:community-noreply@qnx.com>>; Date: Tue, Jul 29, 2014 03:16 PM To: "'photon-graphics@community.qnx.com'"<photon-graphics@community.qnx.com<mailto:photon-graphics@community.qnx.com>>; Subject: RE: A question about PtDamageWidget Hi, sounds a bit odd - ordinarily, I'd expect PtDamageWidget() to cause the draw function being invoked. Are you sure it isn't called, or could it be you just got something in the drawing code wrong (e.g., bad translation, missing flush...)? Did you check with a debugger/log message when the draw function gets called? Can you perhaps post a small test case? Cheers, Thomas -----Original Message----- From: Xiang Lu [mailto:community-noreply@qnx.com] Sent: Dienstag, 29. Juli 2014 09:07 To: photon-graphics Subject: A question about PtDamageWidget Hi, i'm new to Photon developing and I have a problem with my app. I'm trying to use a PtRaw widget to display some graphic made with Photon functions such as PgDrawPolygon, etc. I want to make the raw widget damaged (redrawn) every 1000ms with a timer. In the timer's callback,I call PtDamageWidget(raw) to damage the PtRaw Widget and invoke the drawfunction.But after running it,I found PtDamageWidget() didn't invoke the drawfuntion.Does anyone know the reason,thanks in advance. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post111246 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com<mailto:photon-graphics-unsubscribe@community.qnx.com> _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post111247 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com<mailto:photon-graphics-unsubscribe@community.qnx.com> Thomas Haupt 2014-07-29T07:50:23Z post111248: Re:RE: A question about PtDamageWidget Xiang Lu http://community.qnx.com/sf/go/post111248 2014-07-29T07:25:46Z 2014-07-29T07:25:46Z Thx for reply, I write a simple case, the drawfunction didn't invoke actually. In this case, I want to draw a new line each time, the code is here. ------------------ Original ------------------ From: "Thomas Haupt";<community-noreply@qnx.com>; Date: Tue, Jul 29, 2014 03:16 PM To: "'photon-graphics@community.qnx.com'"<photon-graphics@community.qnx.com>; Subject: RE: A question about PtDamageWidget Hi, sounds a bit odd - ordinarily, I'd expect PtDamageWidget() to cause the draw function being invoked. Are you sure it isn't called, or could it be you just got something in the drawing code wrong (e.g., bad translation, missing flush...)? Did you check with a debugger/log message when the draw function gets called? Can you perhaps post a small test case? Cheers, Thomas -----Original Message----- From: Xiang Lu [mailto:community-noreply@qnx.com] Sent: Dienstag, 29. Juli 2014 09:07 To: photon-graphics Subject: A question about PtDamageWidget Hi, i'm new to Photon developing and I have a problem with my app. I'm trying to use a PtRaw widget to display some graphic made with Photon functions such as PgDrawPolygon, etc. I want to make the raw widget damaged (redrawn) every 1000ms with a timer. In the timer's callback,I call PtDamageWidget(raw) to damage the PtRaw Widget and invoke the drawfunction.But after running it,I found PtDamageWidget() didn't invoke the drawfuntion.Does anyone know the reason,thanks in advance. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post111246 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post111247 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Xiang Lu 2014-07-29T07:25:46Z post111247: RE: A question about PtDamageWidget Thomas Haupt http://community.qnx.com/sf/go/post111247 2014-07-29T07:16:36Z 2014-07-29T07:16:36Z Hi, sounds a bit odd - ordinarily, I'd expect PtDamageWidget() to cause the draw function being invoked. Are you sure it isn't called, or could it be you just got something in the drawing code wrong (e.g., bad translation, missing flush...)? Did you check with a debugger/log message when the draw function gets called? Can you perhaps post a small test case? Cheers, Thomas -----Original Message----- From: Xiang Lu [mailto:community-noreply@qnx.com] Sent: Dienstag, 29. Juli 2014 09:07 To: photon-graphics Subject: A question about PtDamageWidget Hi, i'm new to Photon developing and I have a problem with my app. I'm trying to use a PtRaw widget to display some graphic made with Photon functions such as PgDrawPolygon, etc. I want to make the raw widget damaged (redrawn) every 1000ms with a timer. In the timer's callback,I call PtDamageWidget(raw) to damage the PtRaw Widget and invoke the drawfunction.But after running it,I found PtDamageWidget() didn't invoke the drawfuntion.Does anyone know the reason,thanks in advance. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post111246 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Thomas Haupt 2014-07-29T07:16:36Z post111246: A question about PtDamageWidget Xiang Lu http://community.qnx.com/sf/go/post111246 2014-07-29T07:07:26Z 2014-07-29T07:07:26Z Hi, i'm new to Photon developing and I have a problem with my app. I'm trying to use a PtRaw widget to display some graphic made with Photon functions such as PgDrawPolygon, etc. I want to make the raw widget damaged (redrawn) every 1000ms with a timer. In the timer's callback,I call PtDamageWidget(raw) to damage the PtRaw Widget and invoke the drawfunction.But after running it,I found PtDamageWidget() didn't invoke the drawfuntion.Does anyone know the reason,thanks in advance. Xiang Lu 2014-07-29T07:07:26Z post111243: ApSetTranslation() ignores language regionalization Martin Hollingsworth http://community.qnx.com/sf/go/post111243 2014-07-28T15:49:27Z 2014-07-28T15:49:27Z Hi folks, I have a Photon GUI running QNX OS 6.4.1. I use the QNX Translation mechanism for different languages. During application initialization I use this command to initialize the language of my GUI: int res = ApSetTranslation("de_DE") // for German language in Germany. This returns 0 for success and loads the language file from the set path of ABLPATH=/usr/photon/translations which results in the file path of: ABLPATH=/usr/photon/translations/myapplication.de_DE This mechanism works fine with several languages, as long as I don't seperate between regional versions of one language. As soon as I try to seperate between "de_DE" and "de_CH" I always get the return value "0" for success, but the language file "de_DE" is always loaded. Example: I have the language files: "myapplication.de_DE" and "myapplication.de_CH". In this case with ApSetTranslation("de_CH") still the "de_DE" language file is loaded. But if I delete the "de_DE" file from harddrive, the application loads "de_CH" instead. The same behaviour was verified using "fr_FR" and "fr_CA". I assume there must be something going wrong with the best match algorithm described here in the documentation, unfortunately I can't find out what. http://www.qnx.com/developers/docs/6.3.2/photon/prog_guide/languages.html#RunningYourApplication So if anybody has a great idea how to solve this mystery your help is really appreciated!! Thanks and Greetings, Martin H. Martin Hollingsworth 2014-07-28T15:49:27Z post111150: RE: ApCreateModule Segmentation fault Thomas Haupt http://community.qnx.com/sf/go/post111150 2014-07-22T08:32:51Z 2014-07-22T08:32:51Z Nice! Thanks for letting us know! Cheers, Thomas -----Original Message----- From: Wim Hellenthal [mailto:community-noreply@qnx.com] Sent: Dienstag, 22. Juli 2014 09:28 To: photon-graphics Subject: Re: ApCreateModule Segmentation fault Problem solved!!!! Did the following test: kept the binary resource files as is (running version) copied the original text oriented resource files into the project rebuild the project and got a crash Turned out that some of the original resource files were in UNIX format (CR) and some in Windows format (CRLF). After converting them all to UNIX format the problems disappeared !! Thanks for the help Regards, Wim _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post111149 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Thomas Haupt 2014-07-22T08:32:51Z post111149: Re: ApCreateModule Segmentation fault Wim Hellenthal http://community.qnx.com/sf/go/post111149 2014-07-22T07:27:45Z 2014-07-22T07:27:45Z Problem solved!!!! Did the following test: kept the binary resource files as is (running version) copied the original text oriented resource files into the project rebuild the project and got a crash Turned out that some of the original resource files were in UNIX format (CR) and some in Windows format (CRLF). After converting them all to UNIX format the problems disappeared !! Thanks for the help Regards, Wim Wim Hellenthal 2014-07-22T07:27:45Z post111143: Re: RE: ApCreateModule Segmentation fault Wim Hellenthal http://community.qnx.com/sf/go/post111143 2014-07-21T15:13:59Z 2014-07-21T15:13:59Z I think I have found the cause of the problems thanks to the suggestion given by Thomas. After doing a diff on the WGT files I noticed a difference with respect to the the end-of-line delimiter handling in some of the .wgtd files. Some of the files used CRLF while others didn't. I'm almost certain that this is the cause. Tomorrow I will do a test and let you know if the problem is solved converting one of the text related resource files to windows format and vice versa. Again, thanks for the support! Regards, Wim Wim Hellenthal 2014-07-21T15:13:59Z post111141: Re: RE: ApCreateModule Segmentation fault Renat Ishkin http://community.qnx.com/sf/go/post111141 2014-07-21T12:18:44Z 2014-07-21T12:18:44Z Hello, Wim. I tried to reproduce the problem you described. But I couldn't get your results. If there is a problem to get an example of sources ore test case, can you describe which widgets PhAB you used and make step-by-step instruction to reproduce the issue. May be using header files from target system in your Momentics project will help. Regards, Renat. Renat Ishkin 2014-07-21T12:18:44Z post111140: RE: ApCreateModule Segmentation fault Thomas Haupt http://community.qnx.com/sf/go/post111140 2014-07-21T10:32:12Z 2014-07-21T10:32:12Z Hi Wim, as you describe the situation, I agree that it probably isn't worthwhile to try creating a test case. Could it be that the code was originally built using a significantly older PhAB/Photon/ap version? In that case, it should be sufficient to once slightly modify all PhAB modules, save, and generate. If we wanted to find out what exactly is happening, you might also (after updating the application as lined out above) perform a "diff" between the new and old versions of the wgt/*- and the src/ab* files. That might give us some indication if e.g. a changed resource format is causing your troubles. Regards, Thomas -----Original Message----- From: Wim Hellenthal [mailto:community-noreply@qnx.com] Sent: Montag, 21. Juli 2014 11:37 To: photon-graphics Subject: Re: ApCreateModule Segmentation fault Dear all, First of all, thanks for the support. I think it is not so easy to come up with a reduced test case. The code is proprietary and developed by a third party. It involves quite a lot of code. I could try to create another project for testing but most likely that code will work as expected. I now wonder if it could have something to do with the fact that the complete source was originally designed and build on a different system. After modifying the resources I can build again and again without any problem running the executable (at least not the problems I've found so-far) . Note that I came across a related issue where no segmentation fault occurred but where one of the dialog s did not show up. Regards, Wim _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post111139 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Thomas Haupt 2014-07-21T10:32:12Z post111139: Re: ApCreateModule Segmentation fault Wim Hellenthal http://community.qnx.com/sf/go/post111139 2014-07-21T09:37:24Z 2014-07-21T09:37:24Z Dear all, First of all, thanks for the support. I think it is not so easy to come up with a reduced test case. The code is proprietary and developed by a third party. It involves quite a lot of code. I could try to create another project for testing but most likely that code will work as expected. I now wonder if it could have something to do with the fact that the complete source was originally designed and build on a different system. After modifying the resources I can build again and again without any problem running the executable (at least not the problems I've found so-far) . Note that I came across a related issue where no segmentation fault occurred but where one of the dialog s did not show up. Regards, Wim Wim Hellenthal 2014-07-21T09:37:24Z post111138: RE: ApCreateModule Segmentation fault Thomas Haupt http://community.qnx.com/sf/go/post111138 2014-07-21T08:04:32Z 2014-07-21T08:04:32Z Hi Wim, this sounds odd enough. First, saving alone will not generate the files that "Generate UI" will. The former will mostly affect the *.wgt? files in your project's wgt/ directory, whereas the latter creates (or updates) a series of source files in the src/ directory. Most of those will have names beginning with "ab": Usemsg abLfiles abWfiles abdefine.h abevents.h abimport.h ablibs.h ablinks.h abmain.c abplatform abvars.h abwidgets.h indLfiles proto.h Additionally, this process may create or update source files which were explicitly specified in your widget's callbacks etc. You can delete all of the "src/ab*" files to force a re-generation of those upon "Generate UI", but PhAB will never re-generate or update existing code. E.g., a callback routine already existing in one of your source files will never be touched by PhAB. Consequently, you might add a pre-build action to your IDE project that could remove all those fully generated "ab*" files. But again, that will not cover everything. In theory, the source of your problems could be either the _code_ generated by PhAB, or it could be the widget definitions (in wgt/*) that are bound into your application by 'phabbind'. Hard to tell which one is the actual culprit. Can you come up with a reduced test case for this issue? If so, it would be good to have the source - and perhaps the binary and a core file as well. Regards, Thomas -----Original Message----- From: Wim Hellenthal [mailto:community-noreply@qnx.com] Sent: Donnerstag, 17. Juli 2014 15:27 To: photon-graphics Subject: ApCreateModule Segmentation fault Dear all, I'm having a serious problem with binding the application builder (PhAB) resources. This is what I do Within the PhAB (as part of the IDE): - Generate UI - Save or the other way around. I assume that both action will generate new resource files (including header files) when something has changed. Notice that in the error situation nothing actually has changed. From the IDE Compile all the source files (the post build binds all the resources into the executable using phabbind). Now the following happens for some (not all) of the dialogs that are part of the GUI. Whenever I try to create them I get a segmentation fault. This looks as if there is a mismatch between the generated header files and the position of the resources in the executable. I can only avoid this type of behaviour when modifying the respective dialog by e.g. move the button one pixel and then saving the project again from within PhAB. After recompiling the whole project the dialog will pop-up as expected. But the error will still occur on other dialogs within the project. I can only avoid all the errors by editing all the dialogs and stuff from within phAB. This is however tedious and error prone. I also does not give me any confidence that this will always work. The question is how this can happen and what to do about it. Is there a way to regenerate all the phAB generated files every time I build the project from within the IDE? More important I don't understand why there is a mismatch in the first place. Is this because the generated phAB files are corrupt or has it something to do with the phabbind program? Hope someone can help! By the way I'm using: Momentics IDE version 4.7.0 PhAB version version 2.03 Target (x86), version 6.5.0 I'm using a windows 7 machine as host Best regards, Wim _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post111087 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Thomas Haupt 2014-07-21T08:04:32Z post111118: Re: when I change the contents of a " PtImageArea ", the application failed and eixt .Is there any thing wrong with the following code ? robort smith http://community.qnx.com/sf/go/post111118 2014-07-20T14:14:52Z 2014-07-20T14:14:52Z Thank you very much!!! I guess you have get the key point of this problem! robort smith 2014-07-20T14:14:52Z post111116: Re: when I change the contents of a " PtImageArea ", the application failed and eixt .Is there any thing wrong with the following code ? Oleg Bolshakov http://community.qnx.com/sf/go/post111116 2014-07-19T09:29:01Z 2014-07-19T09:29:01Z Hi Robort, PhCreateImage() call sets clearing flags in p_phimage structure. This clearing proceed after PtSetResource. You can set flags to off state just after PhCreateImage(), e.g.: p_phimage->flags &= !Ph_RELEASE_IMAGE_ALL; As a result the memory won’t be cleared. Don’t forget to clear memory when loaded image will not be needed. Respectfully, Oleg 14 июля 2014 г., в 11:13, robort smith <community-noreply@qnx.com> написал: > //////////////////////////////////////////////////////////////////////////////////////////////////// > > PhImage_t *load_image( char* filename ) > { > PhImage_t *p_phimage; > FILE *image_file; > int image_len; > char *image_data = NULL; > > image_file = fopen( filename , "r"); > if( image_file ){ > fseek( image_file , 0 , SEEK_SET ); > fseek( image_file , 0 , SEEK_END ); > > image_len = ftell( image_file ); > image_data = malloc( image_len ); > > fseek( image_file , 54 , SEEK_SET ); > fread( image_data , image_len - 54 , 1 , image_file); > > p_phimage = PhCreateImage( NULL , 640 , 480 , Pg_IMAGE_DIRECT_888 , 0 , 0 , 0 ); > memcpy( p_phimage->image , image_data , image_len ); > printf(" load image successfully!\n"); > return p_phimage; > } > else > { > return NULL; > } > } > //////////////////////////////////////////////////////////////////////////////////////////////////// > int chg_dis_time( RtTimer_t * p_timer, void * p_data) > { > char temp[20]; > static int i; > static PhImage_t *p_image1; > static PhImage_t *p_image2; > > if( 0 == i ) > { > p_image1 = load_image( "/tmp/door_mark1.bmp" ); > p_image2 = load_image( "/tmp/door_mark2.bmp" ); > } > i += 1; > sprintf( temp , "%d" , i ); > PtSetResource( ABW_text_time , Pt_ARG_TEXT_STRING , temp , 5 ); > if( 1 == i%2) > { > if( p_image1 ) > { > PtSetResource( ABW_image_canvas , Pt_ARG_IMAGEAREA_IMAGE , NULL , 0 ); > } > } > else > { > if( p_image2 ) > { > PtSetResource( ABW_image_canvas , Pt_ARG_IMAGEAREA_IMAGE , p_image2 , 0 ); > } > } > return 0; > } > > > > _______________________________________________ > > Photon microGUI > http://community.qnx.com/sf/go/post111044 > To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Oleg Bolshakov 2014-07-19T09:29:01Z post111106: Re: ApCreateModule Segmentation fault Renat Ishkin(deleted) http://community.qnx.com/sf/go/post111106 2014-07-18T13:59:52Z 2014-07-18T13:59:52Z Hello, Wim. We are trying to reproduce problem for the moment. If we have additional questions, we'll ask you. Regards, Renat. Renat Ishkin(deleted) 2014-07-18T13:59:52Z post111087: ApCreateModule Segmentation fault Wim Hellenthal http://community.qnx.com/sf/go/post111087 2014-07-17T13:27:25Z 2014-07-17T13:27:25Z Dear all, I'm having a serious problem with binding the application builder (PhAB) resources. This is what I do Within the PhAB (as part of the IDE): - Generate UI - Save or the other way around. I assume that both action will generate new resource files (including header files) when something has changed. Notice that in the error situation nothing actually has changed. From the IDE Compile all the source files (the post build binds all the resources into the executable using phabbind). Now the following happens for some (not all) of the dialogs that are part of the GUI. Whenever I try to create them I get a segmentation fault. This looks as if there is a mismatch between the generated header files and the position of the resources in the executable. I can only avoid this type of behaviour when modifying the respective dialog by e.g. move the button one pixel and then saving the project again from within PhAB. After recompiling the whole project the dialog will pop-up as expected. But the error will still occur on other dialogs within the project. I can only avoid all the errors by editing all the dialogs and stuff from within phAB. This is however tedious and error prone. I also does not give me any confidence that this will always work. The question is how this can happen and what to do about it. Is there a way to regenerate all the phAB generated files every time I build the project from within the IDE? More important I don't understand why there is a mismatch in the first place. Is this because the generated phAB files are corrupt or has it something to do with the phabbind program? Hope someone can help! By the way I'm using: Momentics IDE version 4.7.0 PhAB version version 2.03 Target (x86), version 6.5.0 I'm using a windows 7 machine as host Best regards, Wim Wim Hellenthal 2014-07-17T13:27:25Z post111057: How to use " Photon microGUI " to show a seires of pictures? robort smith http://community.qnx.com/sf/go/post111057 2014-07-15T07:53:59Z 2014-07-15T07:53:59Z Now I am using PtImageArea to show a series of pictures .And I find that only when I allocate new memory for all pictures and whitout free any of them ,the program can run. If I free a pictures memory of reuse any piece of it , the program failed robort smith 2014-07-15T07:53:59Z post111044: when I change the contents of a " PtImageArea ", the application failed and eixt .Is there any thing wrong with the following code ? robort smith http://community.qnx.com/sf/go/post111044 2014-07-14T08:13:36Z 2014-07-14T08:13:36Z //////////////////////////////////////////////////////////////////////////////////////////////////// PhImage_t *load_image( char* filename ) { PhImage_t *p_phimage; FILE *image_file; int image_len; char *image_data = NULL; image_file = fopen( filename , "r"); if( image_file ){ fseek( image_file , 0 , SEEK_SET ); fseek( image_file , 0 , SEEK_END ); image_len = ftell( image_file ); image_data = malloc( image_len ); fseek( image_file , 54 , SEEK_SET ); fread( image_data , image_len - 54 , 1 , image_file); p_phimage = PhCreateImage( NULL , 640 , 480 , Pg_IMAGE_DIRECT_888 , 0 , 0 , 0 ); memcpy( p_phimage->image , image_data , image_len ); printf(" load image successfully!\n"); return p_phimage; } else { return NULL; } } //////////////////////////////////////////////////////////////////////////////////////////////////// int chg_dis_time( RtTimer_t * p_timer, void * p_data) { char temp[20]; static int i; static PhImage_t *p_image1; static PhImage_t *p_image2; if( 0 == i ) { p_image1 = load_image( "/tmp/door_mark1.bmp" ); p_image2 = load_image( "/tmp/door_mark2.bmp" ); } i += 1; sprintf( temp , "%d" , i ); PtSetResource( ABW_text_time , Pt_ARG_TEXT_STRING , temp , 5 ); if( 1 == i%2) { if( p_image1 ) { PtSetResource( ABW_image_canvas , Pt_ARG_IMAGEAREA_IMAGE , NULL , 0 ); } } else { if( p_image2 ) { PtSetResource( ABW_image_canvas , Pt_ARG_IMAGEAREA_IMAGE , p_image2 , 0 ); } } return 0; } robort smith 2014-07-14T08:13:36Z post111032: Re: PtProgress widgets has wrong border color Oleg Bolshakov http://community.qnx.com/sf/go/post111032 2014-07-11T10:55:36Z 2014-07-11T10:55:36Z Hi Jan, Here is a modified source. String marked "border will be hidden" disables a border. int main( ) { PtWidget_t *m_root, *m_container, *m_trend, *m_cardio, *m_progress; m_root = PtCreateWidget( PtWindow, Pt_NO_PARENT, 0, NULL); PtSetResource( m_root, Pt_ARG_MARGIN_HEIGHT, 0, 0); PtSetResource( m_root, Pt_ARG_MARGIN_WIDTH, 0, 0); const PhArea_t areaRoot = {{0, 0}, {640, 480}}; PtSetResource( m_root, Pt_ARG_AREA, (long)(&areaRoot), 0); PtRealizeWidget(m_root); m_container = PtCreateWidget(PtOSContainer, m_root, 0, NULL); PtSetResource(m_container, Pt_ARG_MARGIN_HEIGHT, 0, 0); PtSetResource(m_container, Pt_ARG_MARGIN_WIDTH, 0, 0); const PhArea_t areaCont = {{0, 0}, {640, 480}}; PtSetResource(m_container, Pt_ARG_AREA, (long)(&areaCont), 0); PtSetResource(m_container, Pt_ARG_FILL_COLOR, Pg_BLUE, 0); PtRealizeWidget(m_container); m_trend= PtCreateWidget(PtLabel, m_container, 0, NULL); PtSetResource(m_trend, Pt_ARG_MARGIN_HEIGHT, 0, 0); PtSetResource(m_trend, Pt_ARG_MARGIN_WIDTH, 0, 0); const PhArea_t areaTrend = {{0, 50}, {640, 200}}; PtSetResource(m_trend, Pt_ARG_AREA, (long)(&areaTrend), 0); PtSetResource(m_trend, Pt_ARG_FILL_COLOR, Pg_BLACK, 0); PtRealizeWidget(m_trend); m_cardio= PtCreateWidget(PtMTrend, m_container, 0, NULL); PtSetResource(m_cardio, Pt_ARG_MARGIN_HEIGHT, 0, 0); PtSetResource(m_cardio, Pt_ARG_MARGIN_WIDTH, 0, 0); const PhArea_t areaCardio = {{0, 50}, {600, 200}}; PtSetResource(m_cardio, Pt_ARG_AREA, (long)(&areaCardio), 0); PtRealizeWidget(m_cardio); m_progress= PtCreateWidget(PtProgress, m_container, 0, NULL); PtSetResource(m_progress, Pt_ARG_MARGIN_HEIGHT, 0, 0); PtSetResource(m_progress, Pt_ARG_MARGIN_WIDTH, 0, 0); PtSetResource(m_progress, Pt_ARG_HORIZONTAL_ALIGNMENT, Pt_LEFT, 0); PtSetResource(m_progress, Pt_ARG_VERTICAL_ALIGNMENT, Pt_TOP, 0); PtSetResource(m_progress, Pt_ARG_PROGRESS_BAR_COLOR, Pg_GREEN, 0); PtSetResource(m_progress, Pt_ARG_FILL_COLOR, Pg_BLACK, 0); const PhArea_t areaProg = {{200, 100}, {200, 50}}; PtSetResource(m_progress, Pt_ARG_AREA, (long)(&areaProg ), 0); PtSetResource( m_progress, Pt_ARG_FLAGS, Pt_FALSE, Pt_HIGHLIGHTED ); // border will be hidden PtRealizeWidget(m_progress); return( Pt_CONTINUE ); } Respectfully, Oleg 09 июля 2014 г., в 15:39:02, Jan Körner <community-noreply@qnx.com> написал: > Hi Oleg, > > I use QNX 6.5. > > Here are is (a part of) my code: > > PtWidget_t* m_root, m_container, m_trend, m_cardio, m_progress > > m_root = PtCreateWidget(PtWindow, Pt_NO_PARENT, 0, NULL); > PtSetResource(m_root, Pt_ARG_MARGIN_HEIGHT, 0, 0); > PtSetResource(m_root, Pt_ARG_MARGIN_WIDTH, 0, 0); > const PhArea_t areaRoot = {{0, 0}, {640, 480}}; > PtSetResource(m_root, Pt_ARG_AREA, reinterpret_cast<long>(&areaRoot), 0); > PtRealizeWidget(m_root); > > m_container = PtCreateWidget(PtOSContainer, m_root, 0, NULL); > PtSetResource(m_container, Pt_ARG_MARGIN_HEIGHT, 0, 0); > PtSetResource(m_container, Pt_ARG_MARGIN_WIDTH, 0, 0); > const PhArea_t areaCont = {{0, 0}, {640, 480}}; > PtSetResource(m_container, Pt_ARG_AREA, reinterpret_cast<long>(&areaCont), 0); > PtSetResource(m_container, Pt_ARG_FILL_COLOR, Pg_BLUE, 0); > PtRealizeWidget(m_container); > > m_trend= PtCreateWidget(PtLabel, m_container, 0, NULL); > PtSetResource(m_trend, Pt_ARG_MARGIN_HEIGHT, 0, 0); > PtSetResource(m_trend, Pt_ARG_MARGIN_WIDTH, 0, 0); > const PhArea_t areaTrend = {{0, 50}, {640, 200}}; > PtSetResource(m_trend, Pt_ARG_AREA, reinterpret_cast<long>(&areaTrend), 0); > PtSetResource(m_trend, Pt_ARG_FILL_COLOR, Pg_BLACK, 0); > PtRealizeWidget(m_trend); > > m_cardio= PtCreateWidget(PtMTrend, m_container, 0, NULL); > PtSetResource(m_cardio, Pt_ARG_MARGIN_HEIGHT, 0, 0); > PtSetResource(m_cardio, Pt_ARG_MARGIN_WIDTH, 0, 0); > const PhArea_t areaCardio = {{0, 50}, {600, 200}}; > PtSetResource(m_cardio, Pt_ARG_AREA, reinterpret_cast<long>(&areaCardio), 0); > PtRealizeWidget(m_cardio); > > > m_progress= PtCreateWidget(PtProgress, m_container, 0, NULL); > PtSetResource(m_progress, Pt_ARG_MARGIN_HEIGHT, 0, 0); > PtSetResource(m_progress, Pt_ARG_MARGIN_WIDTH, 0, 0); > PtSetResource(m_progress, Pt_ARG_HORIZONTAL_ALIGNMENT, Pt_LEFT, 0); > PtSetResource(m_progress, Pt_ARG_VERTICAL_ALIGNMENT, Pt_TOP, 0); > PtSetResource(m_progress, Pt_ARG_PROGRESS_BAR_COLOR, Pg_GREEN, 0); > PtSetResource(m_progress, Pt_ARG_FILL_COLOR, Pg_BLACK, 0); > const PhArea_t areaProg = {{200, 100}, {200, 50}}; > PtSetResource(m_progress, Pt_ARG_AREA, reinterpret_cast<long>(&areaProg ), 0); > PtRealizeWidget(m_progress); > > Regards, > Jan > > > > _______________________________________________ > > Photon microGUI > http://community.qnx.com/sf/go/post110991 > To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Oleg Bolshakov 2014-07-11T10:55:36Z post111016: RE: RE: RE: Problem when using PtHold() Wojtek Lerch http://community.qnx.com/sf/go/post111016 2014-07-10T13:36:31Z 2014-07-10T13:36:31Z You mentioned that this process is single-threaded. What is this 3rd party app relation to Photon? How is it called from Photon's event loop? Is it via some sort of callbacks (including workprocs or input procs)? The stack trace shows that ReadServer() is called from something in libc -- is that correct? I assume you're calling PtHold() because this process has widgets; have some widgets already been created at the point where it crashes? Or is there a chance that the 3rd party lib somehow manages to call your PtHold() before you have managed to initialize your Photon UI? > -----Original Message----- > From: Aram Kim [mailto:community-noreply@qnx.com] > Sent: Thursday, July 10, 2014 12:31 AM > To: photon-graphics > Subject: Re: RE: RE: Problem when using PtHold() > > Thanks you again. > > I'd search more about PtInit(), PtEnter(), PtLeave(). Thanks you. > > Stack trace is like this: > > (gdb) bt > #0 0xb8330c25 in PtHold() > from /usr/qnx650/target/qnx6/x86/usr/lib/libph.so.3 > #1 0x08053fa3 in receiveGMC() > #2 0xb83fd857 in ReadData() from gmc_client_qnx.so > #3 0xb83fde15 in ReadServer() from gmc_client_qnx.so > #4 0xb0320070 in ?? () from /usr/qnx650/target/qnx6/x86/lib/libc.so.3 > (gdb) > > receiveGMC(), ReadData(), ReadServer() are 3rd party library functions. > Unfortunately we don't have their debug possible library of GMS client, it is > difficult to watch inside of them. > > > > _______________________________________________ > > Photon microGUI > http://community.qnx.com/sf/go/post111011 > To cancel your subscription to this discussion, please e-mail photon-graphics- > unsubscribe@community.qnx.com Wojtek Lerch 2014-07-10T13:36:31Z post111011: Re: RE: RE: Problem when using PtHold() Aram Kim(deleted) http://community.qnx.com/sf/go/post111011 2014-07-10T04:31:16Z 2014-07-10T04:31:16Z Thanks you again. I'd search more about PtInit(), PtEnter(), PtLeave(). Thanks you. Stack trace is like this: (gdb) bt #0 0xb8330c25 in PtHold() from /usr/qnx650/target/qnx6/x86/usr/lib/libph.so.3 #1 0x08053fa3 in receiveGMC() #2 0xb83fd857 in ReadData() from gmc_client_qnx.so #3 0xb83fde15 in ReadServer() from gmc_client_qnx.so #4 0xb0320070 in ?? () from /usr/qnx650/target/qnx6/x86/lib/libc.so.3 (gdb) receiveGMC(), ReadData(), ReadServer() are 3rd party library functions. Unfortunately we don't have their debug possible library of GMS client, it is difficult to watch inside of them. Aram Kim(deleted) 2014-07-10T04:31:16Z post111010: RE: RE: Problem when using PtHold() Wojtek Lerch http://community.qnx.com/sf/go/post111010 2014-07-10T04:18:56Z 2014-07-10T04:18:56Z No, I didn't mean to suggest that the crashes are caused by the fact that your PtHold() calls aren't paired with PtRelease() calls -- apologies if it sounded that way. The only reason I asked about that was because I was curious what those unpaired calls were meant to achieve, and whether there might be a more "proper" way to achieve it. That curiosity was not directly related to the crashes. PtHold() is a simple function. The only two situations that can cause it to crash (other than general memory corruption) are when you call it without initializing the widget library first (via PtInit() or the PhAB equivalent) or when you call it without holding the library lock (i.e. after calling PtLeave() or without calling PtEnter() where appropriate). That's why I asked about threads and stack traces. > -----Original Message----- > From: Aram Kim [mailto:community-noreply@qnx.com] > Sent: July-09-14 8:56 PM > To: photon-graphics > Subject: Re: RE: Problem when using PtHold() > > Thank your for your answer. > > Unfortunately send/receiver messages are done by 3rd party library and it > doesn't use multi-thread. > The library works as like ping service. Just receives message and sends it > again. > > And actually I used other functions which contains PtHold(). > Real source is like this: > > PtClearWidget(displayPane_tp); > ApCreateModule(pLink, displayPane_tp, NULL); > PtReRealizeWidget(displayPane_tp); > > And according to the stack trace my software died when calling PtHold() or > PtRelease(). > So I think pairs of PtHold() and PtRelease() call is not a problem. > > Thanks again to your help. > > > > > _______________________________________________ > > Photon microGUI > http://community.qnx.com/sf/go/post111009 > To cancel your subscription to this discussion, please e-mail photon-graphics- > unsubscribe@community.qnx.com Wojtek Lerch 2014-07-10T04:18:56Z post111009: Re: RE: Problem when using PtHold() Aram Kim(deleted) http://community.qnx.com/sf/go/post111009 2014-07-10T00:56:26Z 2014-07-10T00:56:26Z Thank your for your answer. Unfortunately send/receiver messages are done by 3rd party library and it doesn't use multi-thread. The library works as like ping service. Just receives message and sends it again. And actually I used other functions which contains PtHold(). Real source is like this: PtClearWidget(displayPane_tp); ApCreateModule(pLink, displayPane_tp, NULL); PtReRealizeWidget(displayPane_tp); And according to the stack trace my software died when calling PtHold() or PtRelease(). So I think pairs of PtHold() and PtRelease() call is not a problem. Thanks again to your help. Aram Kim(deleted) 2014-07-10T00:56:26Z post111008: RE: Problem when using PtHold() Wojtek Lerch http://community.qnx.com/sf/go/post111008 2014-07-10T00:39:56Z 2014-07-10T00:39:56Z How do you receive the message? Is your code multithreaded? Could I see a stack trace from a core file? What are you trying to achieve by calling PtHold() without (as it seems) calling PtRelease()? The purpose of PtHold() it to prevent widgets from redrawing themselves multiple times when you're making multiple changes to them, and the intended use is that you call PtHold(), then make your changes to widgets, and then making a matching call to PtRelease(). Yes, PtHold() "just" increments a counter, but it has to find the counter first (and that's probably where it crashes for you) and there are quite a few pieces of code that the counter affects. The expectation is that you should have a matching PtRelease() (in the same thread) for every PtHold() before you return to the event-processing loop, and that you will either not do anything blocking in between, use one of Photon's "modal" mechanisms to do the blocking, or call PtFlush() before blocking, to ensure that the widgets redraw themselves according to their current state before you block. > -----Original Message----- > From: Aram Kim [mailto:community-noreply@qnx.com] > Sent: July-09-14 8:11 PM > To: photon-graphics > Subject: Problem when using PtHold() > > I'm developing a graphical user interface software using PhAB. > > I made some simple program. > It's function is like this: button click -> just call PtHold() > > on_button_click() > { > PtHold(); > } > It works well. > > > But I changed it like this: button click -> send event to server -> receive > response from server -> call PtHold() > > regist_receive(&receive_from_server); > > on_button_click() > { > send_to_server(); > } > > receive_from_server() > { > PtHold(); > } > > In this case program causes memory fault every time. (SIGSEGV) It is same > for PtRelease() too. > > As I know PtHold() just increases count. I guest it's implementation would be > simple. > So I can not image why it causes memory fault. It is so weird. > Anybody can explain about this phenomenon? > > > > _______________________________________________ > > Photon microGUI > http://community.qnx.com/sf/go/post111007 > To cancel your subscription to this discussion, please e-mail photon-graphics- > unsubscribe@community.qnx.com Wojtek Lerch 2014-07-10T00:39:56Z post111007: Problem when using PtHold() Aram Kim(deleted) http://community.qnx.com/sf/go/post111007 2014-07-10T00:11:20Z 2014-07-10T00:11:20Z I'm developing a graphical user interface software using PhAB. I made some simple program. It's function is like this: button click -> just call PtHold() on_button_click() { PtHold(); } It works well. But I changed it like this: button click -> send event to server -> receive response from server -> call PtHold() regist_receive(&receive_from_server); on_button_click() { send_to_server(); } receive_from_server() { PtHold(); } In this case program causes memory fault every time. (SIGSEGV) It is same for PtRelease() too. As I know PtHold() just increases count. I guest it's implementation would be simple. So I can not image why it causes memory fault. It is so weird. Anybody can explain about this phenomenon? Aram Kim(deleted) 2014-07-10T00:11:20Z post110991: Re: PtProgress widgets has wrong border color Jan Körner http://community.qnx.com/sf/go/post110991 2014-07-09T11:39:01Z 2014-07-09T11:39:01Z Hi Oleg, I use QNX 6.5. Here are is (a part of) my code: PtWidget_t* m_root, m_container, m_trend, m_cardio, m_progress m_root = PtCreateWidget(PtWindow, Pt_NO_PARENT, 0, NULL); PtSetResource(m_root, Pt_ARG_MARGIN_HEIGHT, 0, 0); PtSetResource(m_root, Pt_ARG_MARGIN_WIDTH, 0, 0); const PhArea_t areaRoot = {{0, 0}, {640, 480}}; PtSetResource(m_root, Pt_ARG_AREA, reinterpret_cast<long>(&areaRoot), 0); PtRealizeWidget(m_root); m_container = PtCreateWidget(PtOSContainer, m_root, 0, NULL); PtSetResource(m_container, Pt_ARG_MARGIN_HEIGHT, 0, 0); PtSetResource(m_container, Pt_ARG_MARGIN_WIDTH, 0, 0); const PhArea_t areaCont = {{0, 0}, {640, 480}}; PtSetResource(m_container, Pt_ARG_AREA, reinterpret_cast<long>(&areaCont), 0); PtSetResource(m_container, Pt_ARG_FILL_COLOR, Pg_BLUE, 0); PtRealizeWidget(m_container); m_trend= PtCreateWidget(PtLabel, m_container, 0, NULL); PtSetResource(m_trend, Pt_ARG_MARGIN_HEIGHT, 0, 0); PtSetResource(m_trend, Pt_ARG_MARGIN_WIDTH, 0, 0); const PhArea_t areaTrend = {{0, 50}, {640, 200}}; PtSetResource(m_trend, Pt_ARG_AREA, reinterpret_cast<long>(&areaTrend), 0); PtSetResource(m_trend, Pt_ARG_FILL_COLOR, Pg_BLACK, 0); PtRealizeWidget(m_trend); m_cardio= PtCreateWidget(PtMTrend, m_container, 0, NULL); PtSetResource(m_cardio, Pt_ARG_MARGIN_HEIGHT, 0, 0); PtSetResource(m_cardio, Pt_ARG_MARGIN_WIDTH, 0, 0); const PhArea_t areaCardio = {{0, 50}, {600, 200}}; PtSetResource(m_cardio, Pt_ARG_AREA, reinterpret_cast<long>(&areaCardio), 0); PtRealizeWidget(m_cardio); m_progress= PtCreateWidget(PtProgress, m_container, 0, NULL); PtSetResource(m_progress, Pt_ARG_MARGIN_HEIGHT, 0, 0); PtSetResource(m_progress, Pt_ARG_MARGIN_WIDTH, 0, 0); PtSetResource(m_progress, Pt_ARG_HORIZONTAL_ALIGNMENT, Pt_LEFT, 0); PtSetResource(m_progress, Pt_ARG_VERTICAL_ALIGNMENT, Pt_TOP, 0); PtSetResource(m_progress, Pt_ARG_PROGRESS_BAR_COLOR, Pg_GREEN, 0); PtSetResource(m_progress, Pt_ARG_FILL_COLOR, Pg_BLACK, 0); const PhArea_t areaProg = {{200, 100}, {200, 50}}; PtSetResource(m_progress, Pt_ARG_AREA, reinterpret_cast<long>(&areaProg ), 0); PtRealizeWidget(m_progress); Regards, Jan Jan Körner 2014-07-09T11:39:01Z post110990: Re: PtProgress widgets has wrong border color Oleg Bolshakov http://community.qnx.com/sf/go/post110990 2014-07-09T10:47:38Z 2014-07-09T10:47:38Z Hi Jan, What version of QNX do you use? Can you send me a minimal source to reproduce your issue? Respectfully, Oleg 08 июля 2014 г., в 16:43:59, Jan Körner <community-noreply@qnx.com> написал: > Hi Oleg, > > thank you for that suggestion. Unfortunately, it does not work for me. > > The Pt_HIGHLIGHTED entry of Pt_ARG_FLAGS is already set to 0 by default. Even if I reset it, the appearance does not change. > > I only can change the border by changing Pt_ARG_HIGHLIGHT_ROUNDNESS to > 0. That makes the green Pt_ARG_INLINE_COLOR line to have round corners and the blue border is not visible anymore. Perhaps the green inline overlaps the blue border in this case. > > > > Regards, > Jan > > > > _______________________________________________ > > Photon microGUI > http://community.qnx.com/sf/go/post110972 > To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Oleg Bolshakov 2014-07-09T10:47:38Z post110972: Re: PtProgress widgets has wrong border color Jan Körner http://community.qnx.com/sf/go/post110972 2014-07-08T12:43:59Z 2014-07-08T12:43:59Z Hi Oleg, thank you for that suggestion. Unfortunately, it does not work for me. The Pt_HIGHLIGHTED entry of Pt_ARG_FLAGS is already set to 0 by default. Even if I reset it, the appearance does not change. I only can change the border by changing Pt_ARG_HIGHLIGHT_ROUNDNESS to > 0. That makes the green Pt_ARG_INLINE_COLOR line to have round corners and the blue border is not visible anymore. Perhaps the green inline overlaps the blue border in this case. Regards, Jan Jan Körner 2014-07-08T12:43:59Z post110907: Re: PtProgress widgets has wrong border color Oleg Bolshakov http://community.qnx.com/sf/go/post110907 2014-07-02T08:22:01Z 2014-07-02T08:22:01Z Hi Jan, To disable border of PtProgress widget you have to set Pt_HIGHLIGHT to Pt_FALSE. Respectfully, Oleg 01 июля 2014 г., в 14:58:55, Jan Körner <community-noreply@qnx.com> написал: > Hi, > > I have a PtOSCOntainer widget with blue fill color. As its child I have PtMTrend widget which has black fill color by default. On top of that (empty) trend widget, I have a PtProgress widget. The colors for Pt_ARG_PROGRESS_BAR_COLOR and Pt_ARG_FILL_COLOR are set correctly and appear as wished, but there still is a blue border around the progress bar widget. This blue border cannot be changed by setting Pt_ARG_BORDER_COLOR. > Which arguments do I have to set in order to either erase this wrong border or at least change its color? > > Regards, > Jan > > > > _______________________________________________ > > Photon microGUI > http://community.qnx.com/sf/go/post110901 > To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Oleg Bolshakov 2014-07-02T08:22:01Z post110901: PtProgress widgets has wrong border color Jan Körner http://community.qnx.com/sf/go/post110901 2014-07-01T10:58:55Z 2014-07-01T10:58:55Z Hi, I have a PtOSCOntainer widget with blue fill color. As its child I have PtMTrend widget which has black fill color by default. On top of that (empty) trend widget, I have a PtProgress widget. The colors for Pt_ARG_PROGRESS_BAR_COLOR and Pt_ARG_FILL_COLOR are set correctly and appear as wished, but there still is a blue border around the progress bar widget. This blue border cannot be changed by setting Pt_ARG_BORDER_COLOR. Which arguments do I have to set in order to either erase this wrong border or at least change its color? Regards, Jan Jan Körner 2014-07-01T10:58:55Z post110849: RE: RE: phablang on MS Windows Max Feil http://community.qnx.com/sf/go/post110849 2014-06-25T02:37:48Z 2014-06-25T02:37:48Z Unfortunately there is no installer of just PhAB-for-Windows or Photon-for-Windows. You need a full SDP (Momentics) install. Max -----Original Message----- From: Martin Hollingsworth [mailto:community-noreply@qnx.com] Sent: Tuesday, June 24, 2014 7:53 AM To: photon-graphics Subject: Re: RE: phablang on MS Windows Hi Max, thanks for the info and the quick reply! Do you by chance know, if there is a minimal PhAB-for-Windows installer, which comes without any other side components, like Momentics IDE? Thanks and greetings, Martin _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post110841 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Max Feil 2014-06-25T02:37:48Z post110841: Re: RE: phablang on MS Windows Martin Hollingsworth http://community.qnx.com/sf/go/post110841 2014-06-24T11:52:56Z 2014-06-24T11:52:56Z Hi Max, thanks for the info and the quick reply! Do you by chance know, if there is a minimal PhAB-for-Windows installer, which comes without any other side components, like Momentics IDE? Thanks and greetings, Martin Martin Hollingsworth 2014-06-24T11:52:56Z post110839: RE: phablang on MS Windows Max Feil http://community.qnx.com/sf/go/post110839 2014-06-24T09:43:40Z 2014-06-24T09:43:40Z One small change: If you type "ph -run phablang.exe" you don't need to start appbuilder first. This command will start the required photon components if they are not already running. -----Original Message----- From: Max Feil Sent: Tuesday, June 24, 2014 5:40 AM To: photon-graphics Subject: RE: phablang on MS Windows You can launch phablang from within PhAB (appbuilder). Look under Project -> Language Editor. Or you can first start "appbuilder", and then use a command prompt (or Cygwin shell) to type: ph -run phablang.exe Either way you need a proper PhAB-for-Windows installation at the customer site. PhAB must be running because it starts the required Photon components. There are a lot more files needed than the ones you list. Regards, Max -----Original Message----- From: Martin Hollingsworth [mailto:community-noreply@qnx.com] Sent: Monday, June 23, 2014 8:13 AM To: photon-graphics Subject: phablang on MS Windows Hello folks, I have a very old GUI, which was written with Photon Application Builder (PhAB) Version 2.03. Now the customer wants to make some changes in the language translation files, which have to be edited by the "phtoton language editor" > phablang.exe I would like to give the phablang.exe to the customer, so he can edit the language file himself without bothering about the source code. As the documentation says: "Starting the Language Editor as a stand-alone application: If you plan to allow your application to be translated at a customer site, you'll need to include the following files..." http://www.qnx.com/developers/docs/6.3.2/photon/prog_guide/languages.html#LanguageEditor Unfortunately, this doesn't say, how to start phablang.exe on a Microsoft Windows system using phindows (as is done to run PhAB on MS Windows (as installed with QNX Momentics IDE 4.6)). Just copying phablang.exe, phablang.res, ph.dll, cygwin1.dll and languages.def and then starting it, results in an ACCESS_VIOLATION and a stack dump. Does anybody know, how to run phablang on MS Windows without installing the whole QNX Momentics IDE? Your help is appreciated. Greetings, Martin _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post110816 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Max Feil 2014-06-24T09:43:40Z post110838: RE: phablang on MS Windows Max Feil http://community.qnx.com/sf/go/post110838 2014-06-24T09:40:54Z 2014-06-24T09:40:54Z You can launch phablang from within PhAB (appbuilder). Look under Project -> Language Editor. Or you can first start "appbuilder", and then use a command prompt (or Cygwin shell) to type: ph -run phablang.exe Either way you need a proper PhAB-for-Windows installation at the customer site. PhAB must be running because it starts the required Photon components. There are a lot more files needed than the ones you list. Regards, Max -----Original Message----- From: Martin Hollingsworth [mailto:community-noreply@qnx.com] Sent: Monday, June 23, 2014 8:13 AM To: photon-graphics Subject: phablang on MS Windows Hello folks, I have a very old GUI, which was written with Photon Application Builder (PhAB) Version 2.03. Now the customer wants to make some changes in the language translation files, which have to be edited by the "phtoton language editor" > phablang.exe I would like to give the phablang.exe to the customer, so he can edit the language file himself without bothering about the source code. As the documentation says: "Starting the Language Editor as a stand-alone application: If you plan to allow your application to be translated at a customer site, you'll need to include the following files..." http://www.qnx.com/developers/docs/6.3.2/photon/prog_guide/languages.html#LanguageEditor Unfortunately, this doesn't say, how to start phablang.exe on a Microsoft Windows system using phindows (as is done to run PhAB on MS Windows (as installed with QNX Momentics IDE 4.6)). Just copying phablang.exe, phablang.res, ph.dll, cygwin1.dll and languages.def and then starting it, results in an ACCESS_VIOLATION and a stack dump. Does anybody know, how to run phablang on MS Windows without installing the whole QNX Momentics IDE? Your help is appreciated. Greetings, Martin _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post110816 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Max Feil 2014-06-24T09:40:54Z post110816: phablang on MS Windows Martin Hollingsworth http://community.qnx.com/sf/go/post110816 2014-06-23T12:13:14Z 2014-06-23T12:13:14Z Hello folks, I have a very old GUI, which was written with Photon Application Builder (PhAB) Version 2.03. Now the customer wants to make some changes in the language translation files, which have to be edited by the "phtoton language editor" > phablang.exe I would like to give the phablang.exe to the customer, so he can edit the language file himself without bothering about the source code. As the documentation says: "Starting the Language Editor as a stand-alone application: If you plan to allow your application to be translated at a customer site, you'll need to include the following files..." http://www.qnx.com/developers/docs/6.3.2/photon/prog_guide/languages.html#LanguageEditor Unfortunately, this doesn't say, how to start phablang.exe on a Microsoft Windows system using phindows (as is done to run PhAB on MS Windows (as installed with QNX Momentics IDE 4.6)). Just copying phablang.exe, phablang.res, ph.dll, cygwin1.dll and languages.def and then starting it, results in an ACCESS_VIOLATION and a stack dump. Does anybody know, how to run phablang on MS Windows without installing the whole QNX Momentics IDE? Your help is appreciated. Greetings, Martin Martin Hollingsworth 2014-06-23T12:13:14Z post110811: Re: Flickering display: only one of two buffers gets filled. Florian Kosch(deleted) http://community.qnx.com/sf/go/post110811 2014-06-23T09:43:01Z 2014-06-23T09:43:01Z Thank you for your reply, it was indeed a driver problem. I found that one of my parameters in the LCD configuration file was wrong. Those settings do work with the 4DCAPE-43 (T): # devg-omapl1xx.so parameters for tailoring to specific boards and display modes: hsw=41,hfp=8,hbp=47,vsw=10,vfp=3,vbp=9,lpp=298,syncc=1,synce=0,ivs=1,ihs=1,ipc=0,bias=0,acb=0,acbi=0,pcd=22,type=1,lcdx=480,lcdy=272,irq=36,refresh=60,display=lcd Good luck for anyone using this display, Florian Florian Kosch(deleted) 2014-06-23T09:43:01Z post110809: Re: Flickering display: only one of two buffers gets filled. Andrey Docuchaev http://community.qnx.com/sf/go/post110809 2014-06-23T09:07:42Z 2014-06-23T09:07:42Z Hi, Florian! > I suppose Photon is only filling one buffer As far as I can see the driver should always configure both frame buffers with the same address. > Therefore the display is flickering. I suppose this is a driver problem. Regards, Andrey Andrey Docuchaev 2014-06-23T09:07:42Z post110788: Flickering display: only one of two buffers gets filled. Florian Kosch(deleted) http://community.qnx.com/sf/go/post110788 2014-06-20T15:38:43Z 2014-06-20T15:38:43Z Hello, I have a 4D Systems LCD Panel (4dcape-43) connected to a beaglebone black running qnx. I'm using the devg-omaplxx driver contained in the BSP (bsp-nto650-ti-beaglebone-sp1-trunk-201209071340). A logic analyser connected to the lcd interface shows that every valid frame is followed by an empty one. Therefore the display is flickering. I suppose Photon is only filling one buffer. The Datasheet for my TI am335 processor shows that the lcd controller reads from two alternating buffers using DMA. Please reply if you have any idea concerning this error. Regards, Florian Please don't hesitate to ask if you need further information. ----- /etc/system/config/display.conf: device { noautoshutdown=1 drivername=omapl1xx vid=0 did=0 deviceindex=0 modeopts=/etc/system/config/omapl1xx_4DCAPE_43.conf display { xres=480 yres=272 refresh=60 pixel_format=rgb565 } Florian Kosch(deleted) 2014-06-20T15:38:43Z post110327: Re: io-graphics disables output from devc-con-hid (solved) Michael Tasche http://community.qnx.com/sf/go/post110327 2014-05-14T14:16:32Z 2014-05-14T14:16:32Z Hi all, seems to be a bug in many graphics drivers, used for x86. The call "disp_register_adapter()" uncondionally switches the device "/dev/con1" to invisible. I have patched the used driver devg-smi5xx.so, to solve the problem. -Michael Michael Tasche 2014-05-14T14:16:32Z post110293: Re: io-graphics disables output from devc-con-hid Michael Tasche http://community.qnx.com/sf/go/post110293 2014-05-13T10:24:54Z 2014-05-13T10:24:54Z Hello Andrey, attached you will find display.conf. Here are the info's from pidin ar : 208927 io-graphics -dvid=0x126f,did=0x0501,deviceindex=0 -n /dev/photon0 237603 io-graphics -dvid=0x126f,did=0x0501,deviceindex=1 -n /dev/photon1 274469 io-graphics -dvid=0x126f,did=0x0501,deviceindex=2 -n /dev/photon2 307240 io-graphics -dvid=0x126f,did=0x0501,deviceindex=3 -n /dev/photon3 The 4 graphics boards have no VGA-BIOS. There is no graphics driver loaded for the onboard Interface! The on board interface is only used by "devc-con-hid ". It seems to me, io-graphics/devg-smi5xx.so is errornously attaching my on board graphics by bios calls... Regards Michael Michael Tasche 2014-05-13T10:24:54Z post110292: Re: io-graphics disables output from devc-con-hid Andrey Docuchaev http://community.qnx.com/sf/go/post110292 2014-05-13T09:46:02Z 2014-05-13T09:46:02Z Hello, Michael! Please attach your 'display.conf' file and the output of 'pidin ar' for the 1st Photon Session, including command-line options of the io-graphics. Best regards, Andrey Andrey Docuchaev 2014-05-13T09:46:02Z post110262: io-graphics disables output from devc-con-hid Michael Tasche http://community.qnx.com/sf/go/post110262 2014-05-12T09:42:42Z 2014-05-12T09:42:42Z Hi, I am playing with an x86 system with 5 graphic outputs. 1 x Onboard graphics and 4 x pci graphics board (smi5xx) The onboard graphics is only used as console interface (devc-con-hid). The pci boards are used for 4 different Photon Sessions. After starting the 1st io-graphics for one of the PCI-Boards, the console output(devc-con-hid) is no longer taking place. After slaying io-graphics the console is back. There is of course no Photon running for the onboard Interface. Any idea? -Michael Michael Tasche 2014-05-12T09:42:42Z post106306: Direct Mode Bambo Bambolek(deleted) http://community.qnx.com/sf/go/post106306 2013-10-28T11:52:19Z 2013-10-28T11:52:19Z Hi, I would draw some things in direct mode in QNX 6.4. I use PdCreateDirectContex -> PdSetTargetDevice -> PdDirectStart -> PgFlush -> PdDirectStop -> PhDCSetCurrent( oldOneDC ). It looks ok, draws really fast on screeen but in QNX help files someone wrote that I should take care about PhEvent.type = Ph_OFFSCREEN_INVALID -> subtype Pg_EXITED_DIRECT. For this subtype in callback function I'am recreating direct context ( previously releasing old one ). Right after I reinitialize context program goes to function thats redraws my PtRaw widget that contains things I draws previously. So it redraws it again and again and again.... Is somewhere a nice simply examle for using these functions and taking care about moving window/redrawing on timer/ redrawing on event? Best regards!!! Bambo Bambolek(deleted) 2013-10-28T11:52:19Z post105975: single-instance minimal system font rendering Jeffrey Percival http://community.qnx.com/sf/go/post105975 2013-10-16T16:15:43Z 2013-10-16T16:15:43Z I have an app running in a minimal embedded system (no GUI, window manager, none of that) and need to render small strings (e.g "hello world") into bitmaps. I don't want to do any message passing or font servers, and will be happy with a single simple font for all strings. I'd like everything to be resolved at compile time. I can't quite tease out how to do this from the documentation. This description seems to match my desires: Finally, you might determine that you need some applications to run private font server instances to improve font rendering speed. Can anyone point me to the required compile-time requirements for this? Jeffrey Percival 2013-10-16T16:15:43Z post104572: Problems with devg-lx800 and Photon on qnx 6.3.0 Erol Oezguerbuez(deleted) http://community.qnx.com/sf/go/post104572 2013-08-27T14:52:31Z 2013-08-27T14:52:31Z Hi, because of the bug "a lockup produced by running pidin repeatedly in a pterm window" with the devg-lx800 on our Geode machine running QNX 6.3.0 SP2, i've updated this driver with the one from Patch ID 732 which should solve exactly this problem. With the new driver photon will not start again and the screen is freezed. Following settings are used: io-graphics -dlx800 vid=0x1022,did=0x2081,index=0,photon,xres=640,yres=480,bitpp=32 -pphoton Any suggestions ? Erol Oezguerbuez(deleted) 2013-08-27T14:52:31Z post102952: Request "calib" for ARMv7 please offbus ... http://community.qnx.com/sf/go/post102952 2013-07-08T06:02:37Z 2013-07-08T06:02:37Z Hello gods! Now I'm working on a ARMv7 CPU, and need "/usr/photon/bin/calib", but I couldn't find a pre-compiled "calib" for ARMv7, just found a "calib" for ARMv6 in QNX SDP 6.5.0 directory, I tried to run the ARMv6 "calib" on the ARMv7 CPU, then I got this: # calib Photon: Photon Open (phid=6) Received a message from the Photon server. Received a message from the Photon server. ldd:FATAL: Unresolved symbol "__floatsidf" called from Executable Photon: Photon Close (6) Received a message from the Photon server. Received a message from the Photon server. Received a message from the Photon server. ==== UNDERFLOW ERROR ==== + disp_regs 39 SYSCONFIG 28 + disp_regs 41 LCDDMA_CTRL 41 + disp_regs 43 RASTER_CTRL 2ff081 + disp_regs 45 IRQSTATUS_RAW 46 + disp_regs 47 IRQSTATUS 0 + disp_regs 49 IRQENABLE_SET 0 + disp_regs 51 IRQENABLE_CLEAR 0 + disp_regs 53 IRQEOI_VECTOR 0 + disp_regs 55 CLKC_ENABLE 3 + disp_regs 57 CLKC_RESET 0 + disp_regs 59 LCDDMA_FB0_BASE 8d040000 + disp_regs 61 LCDDMA_FB1_BASE 8d040000 Could any gods help me? Thank you! offbus ... 2013-07-08T06:02:37Z post102633: RE: RE: Where Photon binnary or source? Derek Leach http://community.qnx.com/sf/go/post102633 2013-06-25T13:20:22Z 2013-06-25T13:20:22Z yes sir! -----Original Message----- From: James Last [mailto:community-noreply@qnx.com] Sent: June-25-13 4:03 AM To: photon-graphics Subject: Re: RE: Where Photon binnary or source? Thanks for you reply! If I understood right, I can download CD image with QNX for Linux platform (I have Ubuntu 12.04 on my host and QNX on tagret) and just copy Photon binary to correct directory on my BSP. Am I right? _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post102615 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2013-06-25T13:20:22Z post102615: Re: RE: Where Photon binnary or source? James Last http://community.qnx.com/sf/go/post102615 2013-06-25T08:02:59Z 2013-06-25T08:02:59Z Thanks for you reply! If I understood right, I can download CD image with QNX for Linux platform (I have Ubuntu 12.04 on my host and QNX on tagret) and just copy Photon binary to correct directory on my BSP. Am I right? James Last 2013-06-25T08:02:59Z post102560: RE: Where Photon binnary or source? Derek Leach http://community.qnx.com/sf/go/post102560 2013-06-24T13:25:51Z 2013-06-24T13:25:51Z You need to take the binaries from the OS CD set. -----Original Message----- From: James Last [mailto:community-noreply@qnx.com] Sent: June-24-13 4:57 AM To: photon-graphics Subject: Where Photon binnary or source? Hi! I have a Freescale iMX6-Q platform for smart device. I have downloaded BSP from foundry27 and set it on SD-card with u-boot loader. Now I want to set Photon microGUI on my board, but I cant find any information about this process. Also, I can't find the source code or binnary files for Photon. Is this mean, that Photon cannot be set on QNX Neutrino? Can anyone help me with the problem? _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post102554 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2013-06-24T13:25:51Z post102554: Where Photon binnary or source? James Last http://community.qnx.com/sf/go/post102554 2013-06-24T08:57:29Z 2013-06-24T08:57:29Z Hi! I have a Freescale iMX6-Q platform for smart device. I have downloaded BSP from foundry27 and set it on SD-card with u-boot loader. Now I want to set Photon microGUI on my board, but I cant find any information about this process. Also, I can't find the source code or binnary files for Photon. Is this mean, that Photon cannot be set on QNX Neutrino? Can anyone help me with the problem? James Last 2013-06-24T08:57:29Z post102370: Re: PtDivider childs does not resize at runtime using PtSetResource() Jaroslav Rab http://community.qnx.com/sf/go/post102370 2013-06-18T10:12:58Z 2013-06-18T10:12:58Z Anyone? I would be thankful for any little idea. Jaroslav Rab 2013-06-18T10:12:58Z post102071: Re: PtDivider childs does not resize at runtime using PtSetResource() Jaroslav Rab http://community.qnx.com/sf/go/post102071 2013-06-06T20:16:31Z 2013-06-06T20:16:31Z I'm really sorry for the long delay. In the meantime I've found out what causes the problem - PtDivider absolutely ignores the Pt_ARG_MIN_WIDTH flag in its childs. This by the way means that setting this value (either before childs first realization or anytime after) does not trigger a widget resize as it would if it wasn't inside of PtDivider. I need PtDivider obey this flag or another solution to "stop" the user-mouse-dragging at some point defined by me. There is another caveat with setting the overall PtDivider width - see cb_resize00() in the source code for a hacky, but working solution. http://pastebin.com/NnaGxRGq (compiled with -Wall -Wextra -O2 -lph -lm) Jaroslav Rab 2013-06-06T20:16:31Z post101783: Re: PtDivider childs does not resize at runtime using PtSetResource() Misha Nefedov http://community.qnx.com/sf/go/post101783 2013-05-28T19:47:39Z 2013-05-28T19:47:39Z Please post a small example app. Misha Nefedov 2013-05-28T19:47:39Z post101782: PtDivider childs does not resize at runtime using PtSetResource() Jaroslav Rab http://community.qnx.com/sf/go/post101782 2013-05-28T19:42:36Z 2013-05-28T19:42:36Z Why does not PtDivider allow to change the size/dimensions of its childs at runtime using PtSetResource()? I wasn't able to manage resize PtText/PtButton childs in the PtDivider container using PtSetResource(). Neither of Pt_ARG_MIN_WIDTH, Pt_ARG_MAX_WIDTH, Pt_ARG_WIDTH, Pt_ARG_DIM has any effect. According to documentation there is the Pt_CALLBACKS_ACTIVE flag in Pt_ARG_FLAGS to allow calling the drag callback (if set) when any child changes its size. This flag led me to idea that it's possible to change the childs size at runtime. But it seems I was wrong. Or is it really possible? Jaroslav Rab 2013-05-28T19:42:36Z post101705: Re: Custom container widget crashing Windows hosted PhAB David McMinn(deleted) http://community.qnx.com/sf/go/post101705 2013-05-27T09:30:01Z 2013-05-27T09:30:01Z > okay I got it working yesterday, basically you need to update your cygwin to > the latest version so that it actually works in win7 64bit properly. Glad to hear you got it working and thanks for solving it, I'll try this out and see if it works for me too. I can't remember now why I stuck with the cygwin 1.5 series (maybe trying to be as compatible as possible?). I ended up going a different route rather than persisting with PhAB under Windows, which was to map a shared drive under the VirtualBox QNX and use ab on it, with the IDE running under Windows. Im sure there are potential pitfalls doing it that way but it works for my needs. David McMinn(deleted) 2013-05-27T09:30:01Z post101457: Re: Custom container widget crashing Windows hosted PhAB Matthew Jin http://community.qnx.com/sf/go/post101457 2013-05-15T16:07:25Z 2013-05-15T16:07:25Z okay I got it working yesterday, basically you need to update your cygwin to the latest version so that it actually works in win7 64bit properly. Here is the basic steps: 1) I upgraded my cygwin from 1.5.5 to 1.7.18 (latest version as of today) there is no way to go back to older version after you upgrade so I would make necessary backup just in case you need to go back. 2) update your compiler_gnu.h and types.h in your c:\QNX650\host\win32\x86\usr\include\libqnx\sys with the attached file 3) replace the cygwin1.dll in your c:\QNX650\host\win32\x86\usr\photon\bin 4) replace the string.h file in your c:\cygwin\usr\include\ (this is kind of cheating but I had no time to troubleshoot and update all QNX .h file to match the new cygwin gcc version. I know I don't use string.h in my dll so just took the string.h from the old cygwin 1.5.5 version. 5) now you can compile and link your custome widget code with following commands (compile) gcc -c -nostdinc -I /lib/gcc/i686-pc-cygwin/3.4.4/include -I/cygdrive/c/QNX632/host/win32/x86/usr/include -I/usr/include -I/cygdrive/c/qnx650/target/qnx6/usr/include custom.c (link) gcc -shared -o custom.dll custom.o -L/cygdrive/c/qnx650/host/win32/x86/usr/lib/ -lph -lcygwin -lkernel32 Matthew Jin 2013-05-15T16:07:25Z post101428: Re: Generate a Bitmap / JPEG Christian Reinecke http://community.qnx.com/sf/go/post101428 2013-05-15T06:15:46Z 2013-05-15T06:15:46Z Hi, thanks, but I am looking for a way to render a Widget into a Image, i.e. "PtLabel => foo.jpg". How could I put a Widget into the Memory Context? I assume that the MC lets me draw something, like a Line, Pixel etc? And how can I generate an Image-File out of that? Regards, Christian Christian Reinecke 2013-05-15T06:15:46Z post101407: Re: Custom container widget crashing Windows hosted PhAB Matthew Jin http://community.qnx.com/sf/go/post101407 2013-05-14T18:16:00Z 2013-05-14T18:16:00Z I have the exact same problem. I am currently working with QNX support but I don't know if it will be resolved since PhAB is basically going away. But they should still supported it up to 6.5.0 I think. Were you able to even compile with your cygwin 1.5.25? I tried this and I get bunch of compile errors. I know I had to update two .h file (type.h and compiler_gnu.h) supplied by QNX originally to compile under windows XP but this same approach does not work under windows 7 and I think it has to do with cygwin1.dll compatability. I would be curious to know how you compiled in XP and how you are doing it on Win7? Matthew Jin 2013-05-14T18:16:00Z post101376: Re: Generate a Bitmap / JPEG Misha Nefedov http://community.qnx.com/sf/go/post101376 2013-05-14T12:19:13Z 2013-05-14T12:19:13Z Take a look at this family of functions: http://www.qnx.com/developers/docs/6.5.0/topic/com.qnx.doc.photon_lib_ref/pm-base.html Misha Nefedov 2013-05-14T12:19:13Z post101371: Generate a Bitmap / JPEG Christian Reinecke http://community.qnx.com/sf/go/post101371 2013-05-14T07:49:52Z 2013-05-14T07:49:52Z Hi all, does anybody know a way to generate a Bitmap, except than passing it through a Printjob? Something like "generate a Widget and render an Image out of it". Regards, Christian Christian Reinecke 2013-05-14T07:49:52Z post100519: File names not visible in Photon File Manager Nikhil Prad http://community.qnx.com/sf/go/post100519 2013-04-12T13:49:49Z 2013-04-12T13:49:49Z I am new to the QNX 4 system. In the Photon File Manager(PFM), the actual list of files (and folders) is not visible. The files are still there, I can select them, open them, edit them, etc, I just can't see their files names. I am assuming that this is an issue with the text colour. Unfortunately I cannot find any options for altering the text colour in the PFM Configuration options. The attached image shows what my PFM window looks like. In the image, I have a file selected, but the name of the file is not visible. Any help would be appreciated. Nikhil Prad 2013-04-12T13:49:49Z post100363: Re: PDF reader for Photon GUI Kapil Gadgil(deleted) http://community.qnx.com/sf/go/post100363 2013-04-08T07:21:55Z 2013-04-08T07:21:55Z Hi Mike, Did you get a chance to work on horizontal scrolling. It would be great if you could upload the code soon. Thanks Kapil Gadgil(deleted) 2013-04-08T07:21:55Z post100037: Re: Photon Application Builder Misha Nefedov http://community.qnx.com/sf/go/post100037 2013-03-20T12:48:00Z 2013-03-20T12:48:00Z Make sure that your log window is not a child of the 'login window'. It sound like you want to have your log window without a parent altogether. Misha Nefedov 2013-03-20T12:48:00Z post100022: Photon Application Builder pooja chahal http://community.qnx.com/sf/go/post100022 2013-03-20T04:32:29Z 2013-03-20T04:32:29Z I am making a 'log in window ' in Photon Application Builder.I want that Log in window must close automatically on successful log in.But when i try to close the window using 'PtUnrealizeWidget' the main log in window close along with all the windows attach to it. I want to close the log in window only but not the attached windows .Please suggest me some solution along with the functions to use. Thanks. pooja chahal 2013-03-20T04:32:29Z post99722: Re: PDF reader for Photon GUI Kapil Gadgil(deleted) http://community.qnx.com/sf/go/post99722 2013-03-07T04:47:56Z 2013-03-07T04:47:56Z Hi Mike, Thanks for the inputs.I'll try implementing it.Also it would be great if you could upload the code soon. Thanks.. Kapil Gadgil(deleted) 2013-03-07T04:47:56Z post99576: Re: RE: RE: RE: photon font issues porting from QNX 4 to QNX 6 Derek Leach http://community.qnx.com/sf/go/post99576 2013-02-27T14:15:59Z 2013-02-27T14:15:59Z Here are the experimental binaries, hopefully they fix your PHF issues. If you require official builds of these binaries, you will need to go through your tech support representative to arrange a PSP build if your plan permits. For cross reference, these changes are related to PR170061. Derek Leach 2013-02-27T14:15:59Z post99574: Re: RE: RE: RE: photon font issues porting from QNX 4 to QNX 6 Derek Leach http://community.qnx.com/sf/go/post99574 2013-02-27T13:38:09Z 2013-02-27T13:38:09Z I have not forgotten, if they are not posted by Friday, please ping this thread. Derek Leach 2013-02-27T13:38:09Z post99554: Re: PDF reader for Photon GUI Mike Gorchak(deleted) http://community.qnx.com/sf/go/post99554 2013-02-26T19:21:53Z 2013-02-26T19:21:53Z > Thanks for the comments.However to avoid PtScrollContainer I was trying to > implement the horizontal scroll bar itself. Can you give me the pointers as to > how I can target it. I planned to add text selection/copying and horizontal scrolling using mupdf 1.2 engine, which must come out soon. It is a matter of one/two weekends to do this :) If you like to do this yourself, take a look into the phmupdf_draw_content() function, there one variable called offset, it is y-offset of the page, you have to implement x-offset using the same algorithms. And also you have to unlock zoom levels, currently maximum zoom level is calculated using fitting page to the window dimensions. Mike Gorchak(deleted) 2013-02-26T19:21:53Z post99535: Re: PDF reader for Photon GUI Kapil Gadgil(deleted) http://community.qnx.com/sf/go/post99535 2013-02-26T12:50:58Z 2013-02-26T12:50:58Z Hi Mike, Thanks for the comments.However to avoid PtScrollContainer I was trying to implement the horizontal scroll bar itself. Can you give me the pointers as to how I can target it. Thanks Kapil Gadgil(deleted) 2013-02-26T12:50:58Z post99518: Re: RE: RE: RE: RE: io-graphics returns errno 5 Bernd Mohr http://community.qnx.com/sf/go/post99518 2013-02-25T16:03:03Z 2013-02-25T16:03:03Z The output of pidin is pid tid name prio STATE Blocked 1 1 oc/boot/procnto-v6 0f READY 1 2 oc/boot/procnto-v6 255r RECEIVE 1 1 3 oc/boot/procnto-v6 255r RECEIVE 1 1 5 oc/boot/procnto-v6 255r RECEIVE 1 1 6 oc/boot/procnto-v6 10r RECEIVE 1 1 7 oc/boot/procnto-v6 10r RUNNING 1 8 oc/boot/procnto-v6 10r RECEIVE 1 1 9 oc/boot/procnto-v6 11r RECEIVE 1 1 10 oc/boot/procnto-v6 10r RECEIVE 1 1 11 oc/boot/procnto-v6 10r RECEIVE 1 1 12 oc/boot/procnto-v6 10r RECEIVE 1 1 13 oc/boot/procnto-v6 10r RECEIVE 1 2 1 c/boot/devc-sermx1 10r RECEIVE 1 3 1 proc/boot/slogger 10r RECEIVE 1 4 1 proc/boot/pipe 10r SIGWAITINFO 4 2 proc/boot/pipe 10r RECEIVE 1 4 3 proc/boot/pipe 10r RECEIVE 1 5 1 proc/boot/i2c-mx35 10r RECEIVE 1 6 1 proc/boot/i2c-mx35 10r RECEIVE 1 4103 1 roc/boot/io-pkt-v4 21r SIGWAITINFO 4103 2 roc/boot/io-pkt-v4 21r RECEIVE 1 4103 3 roc/boot/io-pkt-v4 10r RECEIVE 14 8200 1 proc/boot/devc-pty 20r RECEIVE 1 8201 1 proc/boot/qconn 10r SIGWAITINFO 8201 2 proc/boot/qconn 10r CONDVAR (0x1210f0) 8201 3 proc/boot/qconn 10r RECEIVE 1 8201 4 proc/boot/qconn 10r RECEIVE 3 8202 1 /boot/devf-generic 10r SIGWAITINFO 8202 2 /boot/devf-generic 10r RECEIVE 1 8203 1 etfs-phycore_imx35 10r RECEIVE 1 8203 2 etfs-phycore_imx35 8r NANOSLEEP 8204 1 proc/boot/io-usb 10r SIGWAITINFO 8204 2 proc/boot/io-usb 21r RECEIVE 4 8204 3 proc/boot/io-usb 21r RECEIVE 7 8204 4 proc/boot/io-usb 21r RECEIVE 1 8204 5 proc/boot/io-usb 10r RECEIVE 10 8204 6 proc/boot/io-usb 10r NANOSLEEP 8204 7 proc/boot/io-usb 10r RECEIVE 10 8205 1 /boot/dev-can-mx35 10r RECEIVE 1 8206 1 t/devb-mmcsd-imx35 10r SIGWAITINFO 8206 2 t/devb-mmcsd-imx35 10r RECEIVE 1 8206 3 t/devb-mmcsd-imx35 21r RECEIVE 4 8207 1 oc/boot/io-display 10r SIGWAITINFO 8207 2 oc/boot/io-display 10r RECEIVE 1 8207 3 oc/boot/io-display 10r RECEIVE 1 8207 4 oc/boot/io-display 10r RECEIVE 3 8207 5 oc/boot/io-display 10r RECEIVE 1 8208 1 proc/boot/ksh 10r SIGSUSPEND 204817 1 proc/boot/pidin 10r REPLY 1 but I am not sure if egl-gears actually ran for more than a couple of milliseconds after I entered the command, as I get the "no error" message immedeately. I still have a pattern on my display which looks lilke random bits at power on. > If you run egl-gears as: > > egl-gears > /dev/null & > > > then you can get the pidin output. If you are not seeing something on the > display, then this points to something being wrong with the GF setup/driver. > > -----Original Message----- > From: Bernd Mohr [mailto:community-noreply@qnx.com] > Sent: February-25-13 10:40 AM > To: photon-graphics > Subject: Re: RE: RE: RE: io-graphics returns errno 5 > > Yes, I have pasted the output from the console to my posting. egl-gers > returns immedeately, there is no way for me the start pidin while it is > running: > # time egl-gears > gf_dev_attach(): No error > 0.03s real 0.01s user 0.00s system > > But I get > Feb 25 16:34:35 6 8 0 devg-imx35: 2D HW accel: 1 > with sloginfo when it has run. > > > Did it actually print: > > > > gf_dev_attach():No error ? > > > > > > Run it in the background, egl-gers &, then type: > > > > pidin > out.txt > > > > slay egl-gears > > > > post out.txt > > > > get the output of 'sloginfo': > > > > sloginfo > slog.txt > > > > post slog.txt > > > > -----Original Message----- > > From: Bernd Mohr [mailto:community-noreply@qnx.com] > > Sent: February-25-13 10:30 AM > > To: photon-graphics > > Subject: Re: RE: RE: io-graphics returns errno 5 > > > > It seems to run: > > # egl-gears > > gf_dev_attach(): No error > > but there is no change on the display. > > > > > > > OK, I missed the point about starting from the command line. If > > > starting from the command line does not work, then there is most > > > likely > > another problem. > > > > > > Let us forget Photon for now, and concentrate on GF. > > > > > > Start io-display. > > > > > > Then try to just run egl-gears, do you see anything, or get an error? > > > > > > -----Original Message----- > > > From: Bernd Mohr [mailto:community-noreply@qnx.com] > > > Sent: February-25-13 10:18 AM > > > To: photon-graphics > > > Subject: Re: RE: io-graphics returns errno 5 > > > > > > Hi, > > > > > > my first attempt to get the GUI running was to enter commands which > > > I mentionend in my original post from the command line of the console. > > > Since it did not work, I tried to put them into the startup script > > > (*.bsh file of the system builder project), but the result was the same. > > > When I boot without the GUI commands in the startup script, there is > > > no process called io-display shown by pidin. There are no other > > > startup > > scripts. > > > > > > Is there a way to check the file system is consistent besides > > > waiting for some seconds before starting the drivers manually and > > > checking that there are no error messages displayed by sloginfo? > > > BTW, I start several other drivers like network, I2C, audio and USB > > > earlier in the *.bsh script; they work without any issues. > > > > > > The content of display.conf is > > > # cat /etc/system/config/display.conf device { > > > drivername=imx35 > > > vid=0 > > > did=0 > > > modeopts=/etc/system/config/imx35.conf > > > display { > > > xres=800 > > > yres=600 > > > refresh=60 > > > pixel_format=rgb565 > > > } > > > } > > > > > > I start io-display using > > > io-display -c /etc/system/config/display.conf -v -dvid=0,did=0 > > > > > > > > > Bernd > > > > > > > > > > > > _______________________________________________ > > > > > > Photon microGUI > > > http://community.qnx.com/sf/go/post99509 > > > To cancel your subscription to this discussion, please e-mail > > > photon-graphics- unsubscribe@community.qnx.com > > > > > > > > > > > > > > _______________________________________________ > > > > Photon microGUI > > http://community.qnx.com/sf/go/post99511 > > To cancel your subscription to this discussion, please e-mail > > photon-graphics- unsubscribe@community.qnx.com > > > > > > > _______________________________________________ > > Photon microGUI > http://community.qnx.com/sf/go/post99514 > To cancel your subscription to this discussion, please e-mail photon-graphics- > unsubscribe@community.qnx.com Bernd Mohr 2013-02-25T16:03:03Z post99515: RE: RE: RE: RE: io-graphics returns errno 5 Derek Leach http://community.qnx.com/sf/go/post99515 2013-02-25T15:41:39Z 2013-02-25T15:41:39Z If you run egl-gears as: egl-gears > /dev/null & then you can get the pidin output. If you are not seeing something on the display, then this points to something being wrong with the GF setup/driver. -----Original Message----- From: Bernd Mohr [mailto:community-noreply@qnx.com] Sent: February-25-13 10:40 AM To: photon-graphics Subject: Re: RE: RE: RE: io-graphics returns errno 5 Yes, I have pasted the output from the console to my posting. egl-gers returns immedeately, there is no way for me the start pidin while it is running: # time egl-gears gf_dev_attach(): No error 0.03s real 0.01s user 0.00s system But I get Feb 25 16:34:35 6 8 0 devg-imx35: 2D HW accel: 1 with sloginfo when it has run. > Did it actually print: > > gf_dev_attach():No error ? > > > Run it in the background, egl-gers &, then type: > > pidin > out.txt > > slay egl-gears > > post out.txt > > get the output of 'sloginfo': > > sloginfo > slog.txt > > post slog.txt > > -----Original Message----- > From: Bernd Mohr [mailto:community-noreply@qnx.com] > Sent: February-25-13 10:30 AM > To: photon-graphics > Subject: Re: RE: RE: io-graphics returns errno 5 > > It seems to run: > # egl-gears > gf_dev_attach(): No error > but there is no change on the display. > > > > OK, I missed the point about starting from the command line. If > > starting from the command line does not work, then there is most > > likely > another problem. > > > > Let us forget Photon for now, and concentrate on GF. > > > > Start io-display. > > > > Then try to just run egl-gears, do you see anything, or get an error? > > > > -----Original Message----- > > From: Bernd Mohr [mailto:community-noreply@qnx.com] > > Sent: February-25-13 10:18 AM > > To: photon-graphics > > Subject: Re: RE: io-graphics returns errno 5 > > > > Hi, > > > > my first attempt to get the GUI running was to enter commands which > > I mentionend in my original post from the command line of the console. > > Since it did not work, I tried to put them into the startup script > > (*.bsh file of the system builder project), but the result was the same. > > When I boot without the GUI commands in the startup script, there is > > no process called io-display shown by pidin. There are no other > > startup > scripts. > > > > Is there a way to check the file system is consistent besides > > waiting for some seconds before starting the drivers manually and > > checking that there are no error messages displayed by sloginfo? > > BTW, I start several other drivers like network, I2C, audio and USB > > earlier in the *.bsh script; they work without any issues. > > > > The content of display.conf is > > # cat /etc/system/config/display.conf device { > > drivername=imx35 > > vid=0 > > did=0 > > modeopts=/etc/system/config/imx35.conf > > display { > > xres=800 > > yres=600 > > refresh=60 > > pixel_format=rgb565 > > } > > } > > > > I start io-display using > > io-display -c /etc/system/config/display.conf -v -dvid=0,did=0 > > > > > > Bernd > > > > > > > > _______________________________________________ > > > > Photon microGUI > > http://community.qnx.com/sf/go/post99509 > > To cancel your subscription to this discussion, please e-mail > > photon-graphics- unsubscribe@community.qnx.com > > > > > > > _______________________________________________ > > Photon microGUI > http://community.qnx.com/sf/go/post99511 > To cancel your subscription to this discussion, please e-mail > photon-graphics- unsubscribe@community.qnx.com _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post99514 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2013-02-25T15:41:39Z post99514: Re: RE: RE: RE: io-graphics returns errno 5 Bernd Mohr http://community.qnx.com/sf/go/post99514 2013-02-25T15:39:58Z 2013-02-25T15:39:58Z Yes, I have pasted the output from the console to my posting. egl-gers returns immedeately, there is no way for me the start pidin while it is running: # time egl-gears gf_dev_attach(): No error 0.03s real 0.01s user 0.00s system But I get Feb 25 16:34:35 6 8 0 devg-imx35: 2D HW accel: 1 with sloginfo when it has run. > Did it actually print: > > gf_dev_attach():No error ? > > > Run it in the background, egl-gers &, then type: > > pidin > out.txt > > slay egl-gears > > post out.txt > > get the output of 'sloginfo': > > sloginfo > slog.txt > > post slog.txt > > -----Original Message----- > From: Bernd Mohr [mailto:community-noreply@qnx.com] > Sent: February-25-13 10:30 AM > To: photon-graphics > Subject: Re: RE: RE: io-graphics returns errno 5 > > It seems to run: > # egl-gears > gf_dev_attach(): No error > but there is no change on the display. > > > > OK, I missed the point about starting from the command line. If > > starting from the command line does not work, then there is most likely > another problem. > > > > Let us forget Photon for now, and concentrate on GF. > > > > Start io-display. > > > > Then try to just run egl-gears, do you see anything, or get an error? > > > > -----Original Message----- > > From: Bernd Mohr [mailto:community-noreply@qnx.com] > > Sent: February-25-13 10:18 AM > > To: photon-graphics > > Subject: Re: RE: io-graphics returns errno 5 > > > > Hi, > > > > my first attempt to get the GUI running was to enter commands which I > > mentionend in my original post from the command line of the console. > > Since it did not work, I tried to put them into the startup script > > (*.bsh file of the system builder project), but the result was the same. > > When I boot without the GUI commands in the startup script, there is > > no process called io-display shown by pidin. There are no other startup > scripts. > > > > Is there a way to check the file system is consistent besides waiting > > for some seconds before starting the drivers manually and checking > > that there are no error messages displayed by sloginfo? > > BTW, I start several other drivers like network, I2C, audio and USB > > earlier in the *.bsh script; they work without any issues. > > > > The content of display.conf is > > # cat /etc/system/config/display.conf > > device { > > drivername=imx35 > > vid=0 > > did=0 > > modeopts=/etc/system/config/imx35.conf > > display { > > xres=800 > > yres=600 > > refresh=60 > > pixel_format=rgb565 > > } > > } > > > > I start io-display using > > io-display -c /etc/system/config/display.conf -v -dvid=0,did=0 > > > > > > Bernd > > > > > > > > _______________________________________________ > > > > Photon microGUI > > http://community.qnx.com/sf/go/post99509 > > To cancel your subscription to this discussion, please e-mail > > photon-graphics- unsubscribe@community.qnx.com > > > > > > > _______________________________________________ > > Photon microGUI > http://community.qnx.com/sf/go/post99511 > To cancel your subscription to this discussion, please e-mail photon-graphics- > unsubscribe@community.qnx.com Bernd Mohr 2013-02-25T15:39:58Z post99513: Re: PDF reader for Photon GUI Mike Gorchak(deleted) http://community.qnx.com/sf/go/post99513 2013-02-25T15:35:13Z 2013-02-25T15:35:13Z > Does it have any relation of scroll container created on PtOSContainer and > offscreen-memory context enabled at the same time? No, PtOSContainer is used just for non-flickering graphics update. I think problem could be in blitting from offscreen memory to PtOSContainer, since I have not implemented horizontal scrolling, it can be an issue. Mike Gorchak(deleted) 2013-02-25T15:35:13Z post99512: RE: RE: RE: io-graphics returns errno 5 Derek Leach http://community.qnx.com/sf/go/post99512 2013-02-25T15:32:30Z 2013-02-25T15:32:30Z Did it actually print: gf_dev_attach():No error ? Run it in the background, egl-gers &, then type: pidin > out.txt slay egl-gears post out.txt get the output of 'sloginfo': sloginfo > slog.txt post slog.txt -----Original Message----- From: Bernd Mohr [mailto:community-noreply@qnx.com] Sent: February-25-13 10:30 AM To: photon-graphics Subject: Re: RE: RE: io-graphics returns errno 5 It seems to run: # egl-gears gf_dev_attach(): No error but there is no change on the display. > OK, I missed the point about starting from the command line. If > starting from the command line does not work, then there is most likely another problem. > > Let us forget Photon for now, and concentrate on GF. > > Start io-display. > > Then try to just run egl-gears, do you see anything, or get an error? > > -----Original Message----- > From: Bernd Mohr [mailto:community-noreply@qnx.com] > Sent: February-25-13 10:18 AM > To: photon-graphics > Subject: Re: RE: io-graphics returns errno 5 > > Hi, > > my first attempt to get the GUI running was to enter commands which I > mentionend in my original post from the command line of the console. > Since it did not work, I tried to put them into the startup script > (*.bsh file of the system builder project), but the result was the same. > When I boot without the GUI commands in the startup script, there is > no process called io-display shown by pidin. There are no other startup scripts. > > Is there a way to check the file system is consistent besides waiting > for some seconds before starting the drivers manually and checking > that there are no error messages displayed by sloginfo? > BTW, I start several other drivers like network, I2C, audio and USB > earlier in the *.bsh script; they work without any issues. > > The content of display.conf is > # cat /etc/system/config/display.conf > device { > drivername=imx35 > vid=0 > did=0 > modeopts=/etc/system/config/imx35.conf > display { > xres=800 > yres=600 > refresh=60 > pixel_format=rgb565 > } > } > > I start io-display using > io-display -c /etc/system/config/display.conf -v -dvid=0,did=0 > > > Bernd > > > > _______________________________________________ > > Photon microGUI > http://community.qnx.com/sf/go/post99509 > To cancel your subscription to this discussion, please e-mail > photon-graphics- unsubscribe@community.qnx.com _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post99511 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2013-02-25T15:32:30Z post99511: Re: RE: RE: io-graphics returns errno 5 Bernd Mohr http://community.qnx.com/sf/go/post99511 2013-02-25T15:30:14Z 2013-02-25T15:30:14Z It seems to run: # egl-gears gf_dev_attach(): No error but there is no change on the display. > OK, I missed the point about starting from the command line. If starting from > the command line does not work, then there is most likely another problem. > > Let us forget Photon for now, and concentrate on GF. > > Start io-display. > > Then try to just run egl-gears, do you see anything, or get an error? > > -----Original Message----- > From: Bernd Mohr [mailto:community-noreply@qnx.com] > Sent: February-25-13 10:18 AM > To: photon-graphics > Subject: Re: RE: io-graphics returns errno 5 > > Hi, > > my first attempt to get the GUI running was to enter commands which I > mentionend in my original post from the command line of the console. Since it > did not work, I tried to put them into the startup script (*.bsh file of the > system builder project), but the result was the same. > When I boot without the GUI commands in the startup script, there is no > process called io-display shown by pidin. There are no other startup scripts. > > Is there a way to check the file system is consistent besides waiting for some > seconds before starting the drivers manually and checking that there are no > error messages displayed by sloginfo? > BTW, I start several other drivers like network, I2C, audio and USB earlier in > the *.bsh script; they work without any issues. > > The content of display.conf is > # cat /etc/system/config/display.conf > device { > drivername=imx35 > vid=0 > did=0 > modeopts=/etc/system/config/imx35.conf > display { > xres=800 > yres=600 > refresh=60 > pixel_format=rgb565 > } > } > > I start io-display using > io-display -c /etc/system/config/display.conf -v -dvid=0,did=0 > > > Bernd > > > > _______________________________________________ > > Photon microGUI > http://community.qnx.com/sf/go/post99509 > To cancel your subscription to this discussion, please e-mail photon-graphics- > unsubscribe@community.qnx.com Bernd Mohr 2013-02-25T15:30:14Z post99510: RE: RE: io-graphics returns errno 5 Derek Leach http://community.qnx.com/sf/go/post99510 2013-02-25T15:20:47Z 2013-02-25T15:20:47Z OK, I missed the point about starting from the command line. If starting from the command line does not work, then there is most likely another problem. Let us forget Photon for now, and concentrate on GF. Start io-display. Then try to just run egl-gears, do you see anything, or get an error? -----Original Message----- From: Bernd Mohr [mailto:community-noreply@qnx.com] Sent: February-25-13 10:18 AM To: photon-graphics Subject: Re: RE: io-graphics returns errno 5 Hi, my first attempt to get the GUI running was to enter commands which I mentionend in my original post from the command line of the console. Since it did not work, I tried to put them into the startup script (*.bsh file of the system builder project), but the result was the same. When I boot without the GUI commands in the startup script, there is no process called io-display shown by pidin. There are no other startup scripts. Is there a way to check the file system is consistent besides waiting for some seconds before starting the drivers manually and checking that there are no error messages displayed by sloginfo? BTW, I start several other drivers like network, I2C, audio and USB earlier in the *.bsh script; they work without any issues. The content of display.conf is # cat /etc/system/config/display.conf device { drivername=imx35 vid=0 did=0 modeopts=/etc/system/config/imx35.conf display { xres=800 yres=600 refresh=60 pixel_format=rgb565 } } I start io-display using io-display -c /etc/system/config/display.conf -v -dvid=0,did=0 Bernd _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post99509 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2013-02-25T15:20:47Z post99509: Re: RE: io-graphics returns errno 5 Bernd Mohr http://community.qnx.com/sf/go/post99509 2013-02-25T15:17:55Z 2013-02-25T15:17:55Z Hi, my first attempt to get the GUI running was to enter commands which I mentionend in my original post from the command line of the console. Since it did not work, I tried to put them into the startup script (*.bsh file of the system builder project), but the result was the same. When I boot without the GUI commands in the startup script, there is no process called io-display shown by pidin. There are no other startup scripts. Is there a way to check the file system is consistent besides waiting for some seconds before starting the drivers manually and checking that there are no error messages displayed by sloginfo? BTW, I start several other drivers like network, I2C, audio and USB earlier in the *.bsh script; they work without any issues. The content of display.conf is # cat /etc/system/config/display.conf device { drivername=imx35 vid=0 did=0 modeopts=/etc/system/config/imx35.conf display { xres=800 yres=600 refresh=60 pixel_format=rgb565 } } I start io-display using io-display -c /etc/system/config/display.conf -v -dvid=0,did=0 Bernd Bernd Mohr 2013-02-25T15:17:55Z post99505: RE: io-graphics returns errno 5 Derek Leach http://community.qnx.com/sf/go/post99505 2013-02-25T14:41:59Z 2013-02-25T14:41:59Z Are you sure the file system is consistent at the time your are first trying to start io-graphics, or some script is not trying to mistakenly start io-graphics twice? What do the contents of your display.conf look like? How are you starting io-display? -----Original Message----- From: Bernd Mohr [mailto:community-noreply@qnx.com] Sent: February-25-13 4:01 AM To: photon-graphics Cc: bernd.mohr@mechatronic.de Subject: io-graphics returns errno 5 Hi all, I am trying to set up a QNX system with a GUI. When I try to start up io-graphics during the boot process, I get the following error message using sloginfo: Feb 25 08:06:42 1 8 0 phfont.so: init... Feb 25 08:06:46 1 8 0 phfont.so: initialized. Feb 25 08:06:47 1 8 0 phfont.so: '/dev/phfont[<32|64>]' server installed. Feb 25 08:06:47 6 8 0 devg-imx35: 2D HW accel: 1 Feb 25 08:06:48 2 8 0 io-graphics: gf_dev_attach('/dev/io-display/0000,0000,0'): gf errno 5 io-graphics: gf_dev_attach('/dev/io-display/0000,0000,0'): gf errno 5 The file does exist: # ls -l /dev/io-display/ total 0 crw-rw---- 1 root display 0, 1 Feb 25 08:06 0000,0000,0 but no /dev/phfont* files exist I have repeated this with DL_DEBUG set to 1, but there seems to be no useful information around the error message : ----8<-------8<------------------ debug: Looking up symbol fwrite debug: Symbol fwrite bound to definition in libc.so.3 debug: Looking up symbol _Fwprep debug: Symbol _Fwprep bound to definition in libc.so.3 debug: Looking up symbol write debug: Symbol write bound to definition in libc.so.3 io-graphics: gf_dev_attach('/dev/io-display/0000,0000,0'): gf errno 5debug: Looking up symbol fputc debug: Symbol fputc bound to definition in libc.so.3 debug: Looking up symbol vslogf debug: Symbol vslogf bound to definition in libphrender.so.2 debug: Looking up symbol __stackavail debug: Symbol __stackavail bound to definition in libc.so.3 debug: Looking up symbol vsnprintf debug: Symbol vsnprintf bound to definition in libc.so.3 debug: Looking up symbol pthread_once ----8<-------8<------------------ I get errno 5 when I call io-graphics for the first time after reboot. If I call it a second (or more) times, I always get crw-rw---- 1 root display 0, 1 Feb 25 08:06 0000,0000,0 # io-graphics -vvv -c /etc/system/config/display.conf io-graphics: gf_dev_attach('/dev/io-display/0000,0000,0'): gf errno 2 from now on. But /dev/io-display/0000,0000,0 is still there, with the access rights unchanged. The way I try to start the GUI is: io-display -c /etc/system/config/display.conf -v -dvid=0,did=0 waitfor /dev/io-display 10 Photon waitfor /dev/photon io-graphics -vvv -c /etc/system/config/display.conf Any ideas? Thanks Bernd _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post99498 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2013-02-25T14:41:59Z post99499: Re: PDF reader for Photon GUI Kapil Gadgil(deleted) http://community.qnx.com/sf/go/post99499 2013-02-25T09:13:42Z 2013-02-25T09:13:42Z Hi Mike, I tried enabling offscreen memory context and I do see an improvement in memory usage. However the horizontal scroll functionality which I implemented using PtScrollContainer stopped working. Only the PtPane gets scrolled instead of the whole drawing area.Following is the code I used to create scroll container. app->phwindow=PtCreateWidget(PtWindow, Pt_NO_PARENT, winargc, winargs); /* Create PtOSContainer widget for flicker-free updating */ PtSetArg(&winargs[winargc++], Pt_ARG_DIM, &app->window.dimension, 0); app->phoscontainer=PtCreateWidget(PtOSContainer, app->phwindow, winargc, winargs); /*Create ScrollContainer for Horizontal Scroll in This Application*/ winargc=0; PtSetArg(&winargs[winargc++], Pt_ARG_DIM, &app->window.dimension, 0); PtSetArg(&winargs[winargc++], Pt_ARG_SCROLLBAR_Y_DISPLAY, Pt_NEVER, 0);//Vertical Scroll bar is not displayed as it is already implemented. app->scrollarea=PtCreateWidget(PtScrollContainer, app->phoscontainer, winargc, winargs); /* Create PtRaw widget for drawings */ winargc=0; PtSetArg(&winargs[winargc++], Pt_ARG_DIM, &app->window.dimension, 0); PtSetArg(&winargs[winargc++], Pt_ARG_FILL_COLOR, PgRGB(0x70, 0x70, 0x70), 0); PtSetArg(&winargs[winargc++], Pt_ARG_RAW_DRAW_F, phmupdf_draw_content, 0); PtSetArg(&winargs[winargc++], Pt_ARG_POINTER, (void*)app, 0); raw_cb.event_mask=Ph_EV_BUT_PRESS | Ph_EV_PTR_MOTION_BUTTON | Ph_EV_PTR_MOTION_NOBUTTON | Ph_EV_BOUNDARY; raw_cb.event_f=phmupdf_content_callback_raw; raw_cb.data=(void*)app; PtSetArg(&winargs[winargc++], Pt_CB_RAW, &raw_cb, 0); /* Create the PtRaw widget */ app->phcontent=PtCreateWidget(PtRaw, app->scrollarea, winargc, winargs); Does it have any relation of scroll container created on PtOSContainer and offscreen-memory context enabled at the same time? Kapil Gadgil(deleted) 2013-02-25T09:13:42Z post99498: io-graphics returns errno 5 Bernd Mohr http://community.qnx.com/sf/go/post99498 2013-02-25T09:00:55Z 2013-02-25T09:00:55Z Hi all, I am trying to set up a QNX system with a GUI. When I try to start up io-graphics during the boot process, I get the following error message using sloginfo: Feb 25 08:06:42 1 8 0 phfont.so: init... Feb 25 08:06:46 1 8 0 phfont.so: initialized. Feb 25 08:06:47 1 8 0 phfont.so: '/dev/phfont[<32|64>]' server installed. Feb 25 08:06:47 6 8 0 devg-imx35: 2D HW accel: 1 Feb 25 08:06:48 2 8 0 io-graphics: gf_dev_attach('/dev/io-display/0000,0000,0'): gf errno 5 io-graphics: gf_dev_attach('/dev/io-display/0000,0000,0'): gf errno 5 The file does exist: # ls -l /dev/io-display/ total 0 crw-rw---- 1 root display 0, 1 Feb 25 08:06 0000,0000,0 but no /dev/phfont* files exist I have repeated this with DL_DEBUG set to 1, but there seems to be no useful information around the error message : ----8<-------8<------------------ debug: Looking up symbol fwrite debug: Symbol fwrite bound to definition in libc.so.3 debug: Looking up symbol _Fwprep debug: Symbol _Fwprep bound to definition in libc.so.3 debug: Looking up symbol write debug: Symbol write bound to definition in libc.so.3 io-graphics: gf_dev_attach('/dev/io-display/0000,0000,0'): gf errno 5debug: Looking up symbol fputc debug: Symbol fputc bound to definition in libc.so.3 debug: Looking up symbol vslogf debug: Symbol vslogf bound to definition in libphrender.so.2 debug: Looking up symbol __stackavail debug: Symbol __stackavail bound to definition in libc.so.3 debug: Looking up symbol vsnprintf debug: Symbol vsnprintf bound to definition in libc.so.3 debug: Looking up symbol pthread_once ----8<-------8<------------------ I get errno 5 when I call io-graphics for the first time after reboot. If I call it a second (or more) times, I always get crw-rw---- 1 root display 0, 1 Feb 25 08:06 0000,0000,0 # io-graphics -vvv -c /etc/system/config/display.conf io-graphics: gf_dev_attach('/dev/io-display/0000,0000,0'): gf errno 2 from now on. But /dev/io-display/0000,0000,0 is still there, with the access rights unchanged. The way I try to start the GUI is: io-display -c /etc/system/config/display.conf -v -dvid=0,did=0 waitfor /dev/io-display 10 Photon waitfor /dev/photon io-graphics -vvv -c /etc/system/config/display.conf Any ideas? Thanks Bernd Bernd Mohr 2013-02-25T09:00:55Z post99469: Re: RE: RE: RE: photon font issues porting from QNX 4 to QNX 6 Mike Lorenz http://community.qnx.com/sf/go/post99469 2013-02-22T15:58:16Z 2013-02-22T15:58:16Z yes, x86 Mike Lorenz 2013-02-22T15:58:16Z post99468: RE: RE: RE: photon font issues porting from QNX 4 to QNX 6 Derek Leach http://community.qnx.com/sf/go/post99468 2013-02-22T15:54:56Z 2013-02-22T15:54:56Z What cpu architecture, x86? -----Original Message----- From: Mike Lorenz [mailto:community-noreply@qnx.com] Sent: February-22-13 10:53 AM To: photon-graphics Subject: Re: RE: RE: photon font issues porting from QNX 4 to QNX 6 I'm using 650 SP1 _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post99466 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2013-02-22T15:54:56Z post99467: RE: RE: RE: photon font issues porting from QNX 4 to QNX 6 Derek Leach http://community.qnx.com/sf/go/post99467 2013-02-22T15:53:48Z 2013-02-22T15:53:48Z I will send you experimental binaries, to see if the problem is fixed. -----Original Message----- From: Mike Lorenz [mailto:community-noreply@qnx.com] Sent: February-22-13 10:53 AM To: photon-graphics Subject: Re: RE: RE: photon font issues porting from QNX 4 to QNX 6 I'm using 650 SP1 _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post99466 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2013-02-22T15:53:48Z post99466: Re: RE: RE: photon font issues porting from QNX 4 to QNX 6 Mike Lorenz http://community.qnx.com/sf/go/post99466 2013-02-22T15:53:13Z 2013-02-22T15:53:13Z I'm using 650 SP1 Mike Lorenz 2013-02-22T15:53:13Z post99465: RE: RE: photon font issues porting from QNX 4 to QNX 6 Derek Leach http://community.qnx.com/sf/go/post99465 2013-02-22T15:47:13Z 2013-02-22T15:47:13Z 650 target? -----Original Message----- From: Mike Lorenz [mailto:community-noreply@qnx.com] Sent: February-22-13 10:36 AM To: photon-graphics Subject: Re: RE: photon font issues porting from QNX 4 to QNX 6 The font server loads the old fashioned fonts but doesn't let display the characters in pterm. And, I'm only able to choose the old font in pterm properties if the flag "f" is changed to "Nf" in the "fontdir" file. That's why I wanted to convert the old files using the new header data. Maybe there's another way: creating a bdf file from the raw character data and converting this bdf using "bdftophf2" . The specs are available at Adobe and x.org ... _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post99464 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2013-02-22T15:47:13Z post99464: Re: RE: photon font issues porting from QNX 4 to QNX 6 Mike Lorenz http://community.qnx.com/sf/go/post99464 2013-02-22T15:36:24Z 2013-02-22T15:36:24Z The font server loads the old fashioned fonts but doesn't let display the characters in pterm. And, I'm only able to choose the old font in pterm properties if the flag "f" is changed to "Nf" in the "fontdir" file. That's why I wanted to convert the old files using the new header data. Maybe there's another way: creating a bdf file from the raw character data and converting this bdf using "bdftophf2" . The specs are available at Adobe and x.org ... Mike Lorenz 2013-02-22T15:36:24Z post99460: RE: photon font issues porting from QNX 4 to QNX 6 Derek Leach http://community.qnx.com/sf/go/post99460 2013-02-22T14:33:32Z 2013-02-22T14:33:32Z Yes, there are two types of phf fonts, PHF and PHFv2. There are both supported by the font server. Is there a problem, or do you want the header definitions for PHFv2? -----Original Message----- From: Mike Lorenz [mailto:community-noreply@qnx.com] Sent: February-22-13 4:29 AM To: photon-graphics Subject: Re: photon font issues porting from QNX 4 to QNX 6 I did some reverse engineering. Theres are differences between old photon fonts and new photon fonts in the header. The data the bitmaped fonts seems to stay the same. Exchanging the pure data of e.g. a 8x16 point sized font (pcs16.phf) doesn't work while preserving the offset to the data (0x3f) and the file size. "mkfontdir" doesn't accept it. I guess, there's some checksum or CRC in the header. The header of the old font is fixed sized. The header of the new fonts is dynamical sized because of the font name. So there are small different sizes between similar font files e.g. between pcs16.phf and pcss16.phf . _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post99450 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2013-02-22T14:33:32Z post99450: Re: photon font issues porting from QNX 4 to QNX 6 Mike Lorenz http://community.qnx.com/sf/go/post99450 2013-02-22T09:29:22Z 2013-02-22T09:29:22Z I did some reverse engineering. Theres are differences between old photon fonts and new photon fonts in the header. The data the bitmaped fonts seems to stay the same. Exchanging the pure data of e.g. a 8x16 point sized font (pcs16.phf) doesn't work while preserving the offset to the data (0x3f) and the file size. "mkfontdir" doesn't accept it. I guess, there's some checksum or CRC in the header. The header of the old font is fixed sized. The header of the new fonts is dynamical sized because of the font name. So there are small different sizes between similar font files e.g. between pcs16.phf and pcss16.phf . Mike Lorenz 2013-02-22T09:29:22Z post99374: photon font issues porting from QNX 4 to QNX 6 Mike Lorenz http://community.qnx.com/sf/go/post99374 2013-02-20T13:44:15Z 2013-02-20T13:44:15Z Hello! I have some issues porting from QNX4 to QNX6.5x I use selfmade .phf - fonts from QNX4 containing own symbols in it for a small photon-application window running a terminal in it. Changing the font using an escape sequence ( echo "\0033\"fphffontname\"" ) causes the terminal to change the size of a terminal because of the character size, but the text is invisible. changing back , eg. to pcterm14 works well (text is visible again). The same happens to pterm windows. I have done: I put the *.phf in the /usr/photon/font_repository and using "mkfontdir -b -d /usr/photon/font_repository" for creating new entries in fontdir file. This works. Watching all installed/registered fonts with a test program using PfQueryFontsCx(...) shows up my fonts. But, looking to the properties of a pterm window doesn't show the own fonts in the custom list. One Difference, I figured out is that the preinstalled fonts FontDetails.flags uses one more bitstring our fonts flag is 0x11 (PHFONT_INFO_FIXED|PHFONT_INFO_PLAIN) ; instead eg. pcterm14 is 0x111 (PHFONT_INFO_SANSERIF|PHFONT_INFO_FIXED|PHFONT_INFO_PLAIN) Using "fontinfo -f fontfile.phf" also shows up one more attribute for the preinstalled fonts: ( "[__PHF_P2_ATTR_][__PF_FIX_]" contrary to our fonts : "[__PF_FIX_]" ) Rendering the fonts using "fontinfo -r ..." shows up all characters. I guess there are some information missing in the header of the font files. Is there any documentation about the header or structure of phf - font files ? I didn't found any in the forum or www . Or is there a font editor ? btw: the font from Mike Gorchak ( http://community.qnx.com/sf/discussion/do/listPosts/projects.graphics/discussion.photon_microgui.topc23114 ) works well too. Thanks in advance Mike Lorenz Mike Lorenz 2013-02-20T13:44:15Z post99288: RE: PC Terminal 24 font for large displays Derek Leach http://community.qnx.com/sf/go/post99288 2013-02-14T14:33:56Z 2013-02-14T14:33:56Z Neat! -----Original Message----- From: Mike Gorchak [mailto:community-noreply@qnx.com] Sent: February-14-13 7:59 AM To: photon-graphics Subject: Re: PC Terminal 24 font for large displays Here is the font source. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post99281 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2013-02-14T14:33:56Z post99281: Re: PC Terminal 24 font for large displays Mike Gorchak(deleted) http://community.qnx.com/sf/go/post99281 2013-02-14T12:59:18Z 2013-02-14T12:59:18Z Here is the font source. Mike Gorchak(deleted) 2013-02-14T12:59:18Z post99280: PC Terminal 24 font for large displays Mike Gorchak(deleted) http://community.qnx.com/sf/go/post99280 2013-02-14T12:58:54Z 2013-02-14T12:58:54Z Hi, I've created a PC Terminal 24 (12x24) some time ago, it is really useful for displays with high pixels density, like 100-150 DPI, where PC Terminal 20 font glyphs are really small. Here is a picture to show how the font looks, and in the next post I will attach a phf font with bdf source. BTW, it even can be recompiled on QNX4 using pdftophf utility. Thanks. Mike Gorchak(deleted) 2013-02-14T12:58:54Z post99277: Re: PDF reader for Photon GUI Mike Gorchak(deleted) http://community.qnx.com/sf/go/post99277 2013-02-14T12:51:59Z 2013-02-14T12:51:59Z > As a solution to this , can I put a check in phpdf_load_page() to check for > PhCreateImage() to return NULL and in this case I may revert back to the > previous zoom level.What all structures I may have to clear and handle. > Attaching the conditional statement : What video card and what graphics driver you using? Maybe it would be a good solution to use offscreen video memory instead of system shared memory? It will be much faster and will leave system memory almost untouched. > Also in some cases of scrolling and zoom I observed the fitz library function > fz_malloc_array() throwing an exception for not enough memory(). Can you > pinpoint me the exact scenario when the memory is allocated using this > function. fz_malloc_*() is used everywhere in the fitz library. Each page rendering operation calls numerous fz_malloc_*() functions. Mike Gorchak(deleted) 2013-02-14T12:51:59Z post99247: Re: PDF reader for Photon GUI Kapil Gadgil(deleted) http://community.qnx.com/sf/go/post99247 2013-02-13T11:38:54Z 2013-02-13T11:38:54Z Hi Mike, After debugging phmupdf on our QNX system , we found that the call PhCreateImage() in phpdf_load_page() was failing and returning NULL.due to which phmupdf crashed. This was happening during continous zoom operations. As a solution to this , can I put a check in phpdf_load_page() to check for PhCreateImage() to return NULL and in this case I may revert back to the previous zoom level.What all structures I may have to clear and handle.Attaching the conditional statement : if(NULL != app->page_image[slotno].page_image_phi) { printf("pointer not null\n"); temp_ptr=app->page_image[slotno].page_image_phi->image; w=app->page_image[slotno].page_image_phi->size.w; h=app->page_image[slotno].page_image_phi->size.h; pitch=app->page_image[slotno].page_image_phi->bpl; } else { printf("NULL Image!!!!! Cannot allocate memory\n"); //Return to previous zoom level } Also in some cases of scrolling and zoom I observed the fitz library function fz_malloc_array() throwing an exception for not enough memory(). Can you pinpoint me the exact scenario when the memory is allocated using this function. Kapil Gadgil(deleted) 2013-02-13T11:38:54Z post99106: Re: PDF reader for Photon GUI Kapil Gadgil(deleted) http://community.qnx.com/sf/go/post99106 2013-02-06T12:33:56Z 2013-02-06T12:33:56Z Hi Mike, I understand that such Applications require large amount of memory, but there should be some upper limit. As I see in current phmupdf is that on scrolling operations on high zoom level the memory usage keeps on increasing and never stops until my application crashes. Thanks Kapil Gadgil(deleted) 2013-02-06T12:33:56Z post98875: Re: PDF reader for Photon GUI Mike Gorchak(deleted) http://community.qnx.com/sf/go/post98875 2013-01-29T19:06:33Z 2013-01-29T19:06:33Z > Can the memory usage of the application be further reduced as our system is > supplied with low memory. Can it be restricted to ~20 MB max. Really, I do not know. As far as I remember upcoming mupdf 1.2 has some improvements regarding memory usage, but I would not have entertained little hope. 30Mb is a very good memory usage for such kind of applications like PDF reader. Mike Gorchak(deleted) 2013-01-29T19:06:33Z post98742: Re: PDF reader for Photon GUI Kapil Gadgil(deleted) http://community.qnx.com/sf/go/post98742 2013-01-23T12:02:00Z 2013-01-23T12:02:00Z Hi Mike, Thanks for the inputs. I tried the options as cache size reduced to 8 MB and PHMUPDF_RENDER_MAX_IMAGES 4 and also reduced anti-aliasing to 4. However I can still see a total memory usage upto ~30 MB on zooming and scrolling operations. Can the memory usage of the application be further reduced as our system is supplied with low memory. Can it be restricted to ~20 MB max. Kapil Gadgil(deleted) 2013-01-23T12:02:00Z post98734: Re: PDF reader for Photon GUI Mike Gorchak(deleted) http://community.qnx.com/sf/go/post98734 2013-01-22T20:57:58Z 2013-01-22T20:57:58Z > Are there any possible fixes for these in generic muPDF1.1 or there may be > some other reasons. There no memory leaks, as far as I know. PhMuPDF consumes about 256Mb of RAM for cache, you can change this value in the main() function of phmupdf.c module: application.settings.cache_size=FZ_STORE_DEFAULT; FZ_STORE_DEFAULT is equal to 256Mb. Also you can change PHMUPDF_RENDER_MAX_IMAGES macro in the phmupdf.h module. Default value is 16, so 16 offscreen/memory contexts will be used to hold 16 pages of document, usually adjacent or last viewed pages. Minimum value is 4. Each cached page can consume 4-8Mb depending on size of PhMuPDF window or zoom value. Mike Gorchak(deleted) 2013-01-22T20:57:58Z post98715: Re: PDF reader for Photon GUI Kapil Gadgil(deleted) http://community.qnx.com/sf/go/post98715 2013-01-22T09:55:22Z 2013-01-22T09:55:22Z Hi Mike, I am able to use Phmudf with generic source 1.0 dowloaded from http://code.google.com/p/mupdf/downloads/detail?name=mupdf-1.0-source.tar.gz&can=2&q= and the phmupdf source code provided by you. However phmupdf consumes a lot of heap and shared memory on scroll and zoom operations.It may be a possible memory leak. Are there any possible fixes for these in generic muPDF1.1 or there may be some other reasons. Thanks ... Kapil Gadgil(deleted) 2013-01-22T09:55:22Z post98685: Re: QNX Photon grid/table widget Jaroslav Rab http://community.qnx.com/sf/go/post98685 2013-01-19T12:58:02Z 2013-01-19T12:58:02Z Thanks for reply, but as is shown in the source code of the demo, I'm already using the RowLayout, but without any luck. Could you please take a look at the demo and try to figure out what am I doing wrong? Jaroslav Rab 2013-01-19T12:58:02Z post98670: Re: QNX Photon grid/table widget Misha Nefedov http://community.qnx.com/sf/go/post98670 2013-01-18T13:56:40Z 2013-01-18T13:56:40Z take a look at this chapter, it has an example code: http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=/com.qnx.doc.photon_prog_guide/geometry.html follow the 'Using layouts' anchor, and scroll down to RowLayout. Misha Nefedov 2013-01-18T13:56:40Z post98633: QNX Photon grid/table widget Jaroslav Rab http://community.qnx.com/sf/go/post98633 2013-01-17T14:06:21Z 2013-01-17T14:06:21Z I need a grid-like widget containing "inside" widgets (PtButton, PtText, PtToggleButton, PtNumericFloat or PtNumericInteger), with column resizing by dragging with mouse. These inside widgets should have uniform heigh and widgets in the same column should have the same width. Any of these inside widgets can get focus at any time (e.g. by clicking on it with LMB). There shall be possibility to remove and add the "inside" widgets (thus I can simulate row manipulation). I tried to implement this behavior using different methods provided by Photon API, but without any luck. I've tried to use anchoring, different containers (PtDivider, PtContainer, PtScrollContainer, PtGroup) and layouts. I've figured, layouts are probably working only in PtWindow; resize policies do not work in nested widgets (neither for parents nor for childs) and the only possibility to display nested widgets is to specify a fixed size which is of course unusable for my purposes. I know, PtScrollContainer needs to know from its childs their size, but it does not work either. It is apparent, the "PtDivider in PtTree" solution does not suffice because of the need to use different widgets inside different grid cells (and not only text separated by tabulator characters!). The following code demonstrates the latest attempt to acomplish a grid-like widget. I'd like to use the grid-like widget in my final application just as is shown in this demo (i.e. nested in a PtContainer which is a direct child of PtWindow). If I try to use e.g. "PtGroup" instead of "PtContainer with Pt_LAYOUT_VERTICAL", the buttons don't get resized (they both don't fill the available width and don't allow the PtDivider to resize the column width). I've tried to accomplish the widge using PtGridLayout instead of PtRowLayout, but the result was the same as with PtRowLayout (i.e. no widgets displayed). http://pastebin.com/2Ej9bEzg Any help would be much appreciated. Jaroslav Rab 2013-01-17T14:06:21Z post98588: Re: PDF reader for Photon GUI Mike Gorchak(deleted) http://community.qnx.com/sf/go/post98588 2013-01-15T18:29:20Z 2013-01-15T18:29:20Z > Mike, > > I am interested in using the PDF reader in a slightly modified way. I > downloaded the source, but could not find an easy way to "make" it. Is > something intentionally missing? I answered directly to your mail. Thanks. Mike Gorchak(deleted) 2013-01-15T18:29:20Z post98587: Re: PDF reader for Photon GUI Mike Gorchak(deleted) http://community.qnx.com/sf/go/post98587 2013-01-15T18:28:42Z 2013-01-15T18:28:42Z > Hi Mike, > > I have implemented horizontal scrollbar using PtScrollContainer and it works > fine. > > Please tell me where in the code has Home ,End , page Up ,page down ,arrow up > and down event been handled. > I went through the code but couldn't find it. All these keys are handled by vertical scrollbar widget (inside a widget). Mike Gorchak(deleted) 2013-01-15T18:28:42Z post98586: Re: PDF reader for Photon GUI Mike Gorchak(deleted) http://community.qnx.com/sf/go/post98586 2013-01-15T18:25:31Z 2013-01-15T18:25:31Z > Hi Mike, > Are there any licence issues with this PDF Reader/code for commercial purpose > ???? > Regds, Sorry for delay, I have not checked this thread :) My sources have Apache 2 license, while all mupdf sources are using GPL v3 license. I'm afraid you have to provide the sources together with binary distribution. Please read the GPL v3 license for more details. Mike Gorchak(deleted) 2013-01-15T18:25:31Z post98468: Re: PDF reader for Photon GUI Mitchell Schoenbrun http://community.qnx.com/sf/go/post98468 2013-01-09T23:42:51Z 2013-01-09T23:42:51Z Mike, I am interested in using the PDF reader in a slightly modified way. I downloaded the source, but could not find an easy way to "make" it. Is something intentionally missing? Thanks, Mitchell Mitchell Schoenbrun 2013-01-09T23:42:51Z post98101: RE: Photon microGUI QNX 6.5.0 and phindows 2.0 Max Feil http://community.qnx.com/sf/go/post98101 2012-12-13T22:51:22Z 2012-12-13T22:51:22Z The older licenses should still work for Phindows 3. -----Original Message----- From: Pekka Tuusjärvi [mailto:community-noreply@qnx.com] Sent: Thursday, December 13, 2012 3:06 AM To: photon-graphics Subject: Photon microGUI QNX 6.5.0 and phindows 2.0 Hi, our customer has a older 2.0 licenses for phindows and they need the phindows to operate our system. Now when we updated from QNX 6.3.2 to QNX 6.5.0 some displays on our IDE stopped to see on phindows 2.0. On those displays there are 150+ widgets. On phindows 3 it works fine though. Is there any workaround for this issue? _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post98076 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Max Feil 2012-12-13T22:51:22Z post98076: Photon microGUI QNX 6.5.0 and phindows 2.0 Pekka Tuusjärvi(deleted) http://community.qnx.com/sf/go/post98076 2012-12-13T08:05:41Z 2012-12-13T08:05:41Z Hi, our customer has a older 2.0 licenses for phindows and they need the phindows to operate our system. Now when we updated from QNX 6.3.2 to QNX 6.5.0 some displays on our IDE stopped to see on phindows 2.0. On those displays there are 150+ widgets. On phindows 3 it works fine though. Is there any workaround for this issue? Pekka Tuusjärvi(deleted) 2012-12-13T08:05:41Z post98021: Re: Need qwinph Package for QWindows in Photon - AKA beta.qwinph Ivan Kulakova http://community.qnx.com/sf/go/post98021 2012-12-12T10:27:29Z 2012-12-12T10:27:29Z Hello, Phillip. Did you have a qwinph package? I hope that you still have a qwinph package. I really need this thing for my work, and I don't know where else to find it. So please send me this package, if you still have it. Thanks. quosenk@mail.ru Ivan Kulakova 2012-12-12T10:27:29Z post97927: Re: Display horizontal/vertical scale on a trend graph ? KB(deleted) http://community.qnx.com/sf/go/post97927 2012-12-10T10:59:25Z 2012-12-10T10:59:25Z Anyone please ? KB(deleted) 2012-12-10T10:59:25Z post97792: Re: PDF reader for Photon GUI Kapil Gadgil(deleted) http://community.qnx.com/sf/go/post97792 2012-12-05T07:05:00Z 2012-12-05T07:05:00Z Hi Mike, Are there any licence issues with this PDF Reader/code for commercial purpose???? Regds, Kapil Gadgil(deleted) 2012-12-05T07:05:00Z post97672: Photon GUI pooja chahal http://community.qnx.com/sf/go/post97672 2012-11-30T11:11:47Z 2012-11-30T11:11:47Z i have create a gui window,in which there are 2 options to log in,for two different screens.I want that if i m logging in 1 screen then i am not able to log in second one.and if i try to log in second onea message would come that i am already logged in another. but i am not able to do that ,please suggest some solution how to do this. pooja chahal 2012-11-30T11:11:47Z post97605: phshutdown Max Baldwin(deleted) http://community.qnx.com/sf/go/post97605 2012-11-29T10:02:29Z 2012-11-29T10:02:29Z While shutting down QNX neutrino using phshutdown(either reboot or shutdown),system hangs while killing message queues(mqueue).the message displayed on screen is Shutting down service providers(mqueue) What could be the reason for this ? Max Baldwin(deleted) 2012-11-29T10:02:29Z post97539: PhEventPeek Max Baldwin(deleted) http://community.qnx.com/sf/go/post97539 2012-11-28T07:55:17Z 2012-11-28T07:55:17Z While shutting down my QNX 6.4.0 box i am getting this error message, PhEventPeek failed : No such process PHEventPeek failed : Bad file descriptor But photon is working fine in my system.This message appears randomly(not noticed during every shutdown).It should also be noted that the above messages correspond to errno's 3&9 respectively. Execute errno 3,errno 9 in pterm to check the output What was the root cause of this message ? Max Baldwin(deleted) 2012-11-28T07:55:17Z post97424: RE: Widget flicks if not rectangular [SOLVED] Derek Leach http://community.qnx.com/sf/go/post97424 2012-11-23T14:09:18Z 2012-11-23T14:09:18Z Excellent, good to hear! Have a good weekend! -----Original Message----- From: Pablo Cepedal [mailto:community-noreply@qnx.com] Sent: November-23-12 8:16 AM To: photon-graphics Subject: Widget flicks if not rectangular [SOLVED] Derek, first of all I would like to thank you and Misha for your time and dedication... We have been trying to solve this for weeks (and reading the entire Help) but no answer was found until you helped us. I'd tried many ways to fix this (including moving the RRender function inside the draw_f() callback of the PtRaw widget) but we still were using the MemoryContext, so it didn't worked then. We tried the modified case (I don't know why the timer didn't have the repeat value in the test case I sent) and it worked perfectly! Now our widgets don't flick (or tear). Finally, we put the call to RRender into the draw callback of the raw widget and the problem was fixed. The app is being developed in 6.4.1. Best regards. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post97423 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-11-23T14:09:18Z post97423: Widget flicks if not rectangular [SOLVED] Pablo Cepedal http://community.qnx.com/sf/go/post97423 2012-11-23T13:16:20Z 2012-11-23T13:16:20Z Derek, first of all I would like to thank you and Misha for your time and dedication... We have been trying to solve this for weeks (and reading the entire Help) but no answer was found until you helped us. I'd tried many ways to fix this (including moving the RRender function inside the draw_f() callback of the PtRaw widget) but we still were using the MemoryContext, so it didn't worked then. We tried the modified case (I don't know why the timer didn't have the repeat value in the test case I sent) and it worked perfectly! Now our widgets don't flick (or tear). Finally, we put the call to RRender into the draw callback of the raw widget and the problem was fixed. The app is being developed in 6.4.1. Best regards. Pablo Cepedal 2012-11-23T13:16:20Z post97384: Re: Widget flicks if not rectangular Derek Leach http://community.qnx.com/sf/go/post97384 2012-11-22T13:57:56Z 2012-11-22T13:57:56Z I forgot to mention, we did all our testing on 6.5.0, just for the record. Derek Leach 2012-11-22T13:57:56Z post97383: Re: Widget flicks if not rectangular Derek Leach http://community.qnx.com/sf/go/post97383 2012-11-22T13:54:23Z 2012-11-22T13:54:23Z Hi Pablo, You can find the information I am about to discuss at the following URL: http://www.qnx.com/developers/docs/6.4.0/photon/widget_ref/ptraw.html After reviewing, and fixing the test case to compile, there were several drawing issues that needed to be addressed to avoid tearing, and or flickering. 1) Set the repeat value for the PtTimer widget 2) Removed the call to RRender() from the PtTimer tick handler callback. 3) Integrated the RRender() call directly into PtRaw draw_f() callback. 4) Implemented proper canvas calculation and clip rectangle setting in PtRaw draw_f callback. After these issues were addressed, I changed the code to update the float numerical value in the PtLabel on every draw pass, to simulate draw updates. I also modified the coordinates of the polygon draw, so that a simple animation would occur. We tested the new code on a Pentium D processor with the vesabios, and svga driver, and did not witness any tearing or flickering. The main issue with the original version of the code, was drawing outside the draw scope of the PtRaw draw flow (calling RRender() from tick handler). Try the modified test case (see attached), and determine if it flickers on your target setup. If no flicker is witnessed on your target setup with the modified test case, please modify your code to follow the sample coding principals. If you still encounter flicker after updating your application, change the test case to more truly represent your application. Regards, Derek Derek Leach 2012-11-22T13:54:23Z post97340: Re: RE: Widget flicks if not rectangular Pablo Cepedal http://community.qnx.com/sf/go/post97340 2012-11-21T15:39:34Z 2012-11-21T15:39:34Z Derek, we have a support contact at Tempel, a QNX sales representative for Argentina. Thanks again for your help. Pablo Cepedal 2012-11-21T15:39:34Z post97336: RE: Widget flicks if not rectangular Derek Leach http://community.qnx.com/sf/go/post97336 2012-11-21T13:35:47Z 2012-11-21T13:35:47Z Hi Pablo, Not yet, will look at it today for a preliminary look over. Do you have a support contact at QNX? Regards, Derek -----Original Message----- From: Pablo Cepedal [mailto:community-noreply@qnx.com] Sent: November-21-12 6:03 AM To: photon-graphics Subject: Re: Widget flicks if not rectangular Hi Derek. I just wanted to know if you had the chance to get into this topic again. Thanks again and sorry for my insistence. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post97331 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-11-21T13:35:47Z post97331: Re: Widget flicks if not rectangular Pablo Cepedal http://community.qnx.com/sf/go/post97331 2012-11-21T11:03:09Z 2012-11-21T11:03:09Z Hi Derek. I just wanted to know if you had the chance to get into this topic again. Thanks again and sorry for my insistence. Pablo Cepedal 2012-11-21T11:03:09Z post97178: Custom container widget crashing Windows hosted PhAB David McMinn(deleted) http://community.qnx.com/sf/go/post97178 2012-11-14T13:31:16Z 2012-11-14T13:31:16Z Hi, I am trying to create a custom container widget (subclassed from PtContainer) and find that it crashes PhAB when hosted under Windows. I'm using QNX 6.5.0 SDP on Windows 7 Pro x64. My target is x86 and for testing I have VirtualBox running with QNX installed from the SDP CD. I have managed to create a custom widget subclassed from PtBasic in the past and have been able to add it, set resources and see the live widget display and am following pretty much the same procedure. I could only find cygwin 1.5.25 to install, which is different from the one supplied with QNX (1.5.24). It stops me being able to use cygwin's bash at the same time as PhAB but I don't know if there any other conflicts. Now I am trying to create a custom widget subclassed from PtContainer and am going through the help as I do it, but in order to get some confidence I have done only the minimum (I think) I need to get a custom container going. I've attached the source here but there is basically only 1 new resource, I override the defaults function and no others. After I build, make the DLL available on my path and add the definition to PhAB I try to use it. I select "Add Widget Class..", which then prompts for the class. Enter that, PhAB finds it as it says it is going to add a widget of class <name> to my base window and when I click on continue it crashes. Are there any hints on how to track down what is causing this crash? The output on PhAB's console window doesn't say anything. Are there any functions I must provide for a custom container widget? I know this has no bearing on the correctness of my code but I am able to built the custom widget for my target, add it to the self hosted PhAB and use it without crashes. Whether there is some stray error in my widget code that causes Windows PhAB to crash but not QNX PhAB I don't know. Thanks. David McMinn(deleted) 2012-11-14T13:31:16Z post97156: Widget flicks if not rectangular Pablo Cepedal http://community.qnx.com/sf/go/post97156 2012-11-13T19:13:57Z 2012-11-13T19:13:57Z Derek, first of all, thanks again for all your help. I'll try to make a self-contained example of what I'm trying to do. It's a bit complicated because I'm trying to reuse an application we've already made without PhAB. The critical part of the application updates its state using messaging with some existing modules and updates an image every 200 ms. This image is the same size of the full screen, 640 x 480 and on top of that we need to have some indicators, such as labels that also update their value every 200ms. The app needs to run on an embedded AMD Geode LX-800 chipset with a 640 x 480 screen, 256Mb RAM and 1Gb EEPROM. I'm developing on a PC with ASUS MB, AMD Sempron processor and 512Mb RAM running QNX 6.4.1 with svga drivers. I think it's because of my bad english that "flickering" may not be the most accurate term for what I see on screen but it's the closest word that I know for that but I don't know the exact meaning of "tearing". I've attached the .tar file with the basics of the project. Thanks in advance. Pablo Cepedal 2012-11-13T19:13:57Z post97150: RE: RE: RE: RE: RE: Widget flicks if not rectangular Derek Leach http://community.qnx.com/sf/go/post97150 2012-11-13T16:48:19Z 2012-11-13T16:48:19Z Hi Pablo, We would like a self-contained test case, that we can compile. It does not need to be your exact code, just something that represents it. It is quite possible that "tearing" will occur, with an unaccelerated driver, but we would be surprised if there was flickering. If you can send us the test case that we can compile and run, we will give the best solution we can think of. Regards, Derek -----Original Message----- From: Pablo Cepedal [mailto:community-noreply@qnx.com] Sent: November-12-12 12:15 PM To: photon-graphics Subject: Re: RE: RE: RE: RE: Widget flicks if not rectangular Hi. I've tried reparenting the labels into PtOSContainer but I can still see the screen/image sweeping. The app is something like this: 1) A window created in PhAB that contains: - PtOSContainer - PtRaw (PtOSContainer's child) - PtLabel (PtOSContainer's child) 2) A timer_cb that ticks every 200 ms. This cb does the following: 2.1) Updates the app state (data input). 2.2) Render function (that makes conversions from data input (GPS) and screen) This function makes some calculations and uses the Photon primitives: First: // Fills a rectangle the same size of the screen with a certain color PgSetFillColor(); PgDrawRect(r, Pg_DRAW_FILL); Then: // Draws the polygons and lines needed. PgDrawPolygon() PgSetStrokeColor() PgDrawLine() ... 2.3) Damages the PtRaw widget. 3) The draw_function that runs with every PtDamageWidget() does this: 3.1) Sets the label's text with: PtSetResource(ABW_speed_label, Pt_ARG_TEXT_STRING, speed, strlen(speed)); 3.2) PgDrawPhImage(&pos, VidImg1, NULL)... where: - &pos is a PhPoint_t {0,0} - VidImg1 is the image that was formerly modified with every 200 ms loop in PmMemoryContext_t and flushed into the PtRaw widget. The idea of this is to show some GPS map (along with some other data, generated in item 2.2) and to put some controls and labels on top of that graphic. Please let me know if this is enough or if you need some more details/code. Thanks for your time. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post97108 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-11-13T16:48:19Z post97108: Re: RE: RE: RE: RE: Widget flicks if not rectangular Pablo Cepedal http://community.qnx.com/sf/go/post97108 2012-11-12T17:14:47Z 2012-11-12T17:14:47Z Hi. I've tried reparenting the labels into PtOSContainer but I can still see the screen/image sweeping. The app is something like this: 1) A window created in PhAB that contains: - PtOSContainer - PtRaw (PtOSContainer's child) - PtLabel (PtOSContainer's child) 2) A timer_cb that ticks every 200 ms. This cb does the following: 2.1) Updates the app state (data input). 2.2) Render function (that makes conversions from data input (GPS) and screen) This function makes some calculations and uses the Photon primitives: First: // Fills a rectangle the same size of the screen with a certain color PgSetFillColor(); PgDrawRect(r, Pg_DRAW_FILL); Then: // Draws the polygons and lines needed. PgDrawPolygon() PgSetStrokeColor() PgDrawLine() ... 2.3) Damages the PtRaw widget. 3) The draw_function that runs with every PtDamageWidget() does this: 3.1) Sets the label's text with: PtSetResource(ABW_speed_label, Pt_ARG_TEXT_STRING, speed, strlen(speed)); 3.2) PgDrawPhImage(&pos, VidImg1, NULL)... where: - &pos is a PhPoint_t {0,0} - VidImg1 is the image that was formerly modified with every 200 ms loop in PmMemoryContext_t and flushed into the PtRaw widget. The idea of this is to show some GPS map (along with some other data, generated in item 2.2) and to put some controls and labels on top of that graphic. Please let me know if this is enough or if you need some more details/code. Thanks for your time. Pablo Cepedal 2012-11-12T17:14:47Z post97102: RE: RE: RE: RE: Widget flicks if not rectangular Derek Leach http://community.qnx.com/sf/go/post97102 2012-11-12T15:27:47Z 2012-11-12T15:27:47Z Hi Pablo, The buttons would also need to be parented to the PtOSContainer: PtOSContainer <--- PtRaw <--- PtButton's 6.5.0 also contains single-pass rendering, which provide better performance. The problem is, that SVGA and vesabios drivers do not provide offscreen memory, and your NVidia chipset does not have an accelerated driver to take advantage of this. Please parent the buttons and labels to the PtOSContainer as well. If there is no improvement, please post a simple test case for our review, that demonstrates the problem. Regards, Derek -----Original Message----- From: Pablo Cepedal [mailto:community-noreply@qnx.com] Sent: November-12-12 10:06 AM To: photon-graphics Subject: Re: RE: RE: RE: Widget flicks if not rectangular I have one question about the PtOSContainer as "parent" of PtRaw. I'm using PhAB to make the app, so I'm putting the PtRaw widget inside the PtOSContainer (so it's his child in the Module Tree). ¿Is it enough doing this or should I add something inside the app code? Thx _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post97100 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-11-12T15:27:47Z post97101: RE: RE: RE: RE: Widget flicks if not rectangular Derek Leach http://community.qnx.com/sf/go/post97101 2012-11-12T15:12:16Z 2012-11-12T15:12:16Z It should be enough. I am waiting for Misha to come back, so I can discuss with him (he is in a meeting). -----Original Message----- From: Pablo Cepedal [mailto:community-noreply@qnx.com] Sent: November-12-12 10:06 AM To: photon-graphics Subject: Re: RE: RE: RE: Widget flicks if not rectangular I have one question about the PtOSContainer as "parent" of PtRaw. I'm using PhAB to make the app, so I'm putting the PtRaw widget inside the PtOSContainer (so it's his child in the Module Tree). ¿Is it enough doing this or should I add something inside the app code? Thx _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post97100 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-11-12T15:12:16Z post97100: Re: RE: RE: RE: Widget flicks if not rectangular Pablo Cepedal http://community.qnx.com/sf/go/post97100 2012-11-12T15:06:02Z 2012-11-12T15:06:02Z I have one question about the PtOSContainer as "parent" of PtRaw. I'm using PhAB to make the app, so I'm putting the PtRaw widget inside the PtOSContainer (so it's his child in the Module Tree). ¿Is it enough doing this or should I add something inside the app code? Thx Pablo Cepedal 2012-11-12T15:06:02Z post97094: Re: RE: RE: RE: Widget flicks if not rectangular Pablo Cepedal http://community.qnx.com/sf/go/post97094 2012-11-12T14:17:55Z 2012-11-12T14:17:55Z > Are you using 6.5.0 OS? Misha, I'm using 6.4.1 Pablo Cepedal 2012-11-12T14:17:55Z post97088: RE: RE: RE: Widget flicks if not rectangular Derek Leach http://community.qnx.com/sf/go/post97088 2012-11-12T13:25:14Z 2012-11-12T13:25:14Z Just for the forum, Pablo is using this VGA chipset: Class = Display (VGA) Vendor ID = 10deh, nVidia Corporation Device ID = 3d6h, Unknown Unknown PCI index = 0h Class Codes = 030000h Revision ID = a2h Bus number = 0 Device number = 13 Function num = 0 Status Reg = b0h Command Reg = 7h Header type = 0h Single-function BIST = 0h Build-in-self-test not supported Latency Timer = 0h Cache Line Size= 0h -----Original Message----- From: Pablo Cepedal [mailto:community-noreply@qnx.com] Sent: November-12-12 5:57 AM To: photon-graphics Subject: Re: RE: RE: Widget flicks if not rectangular Ok, that is the problem, I would expect svga to work better, because it has a backbuffer. What version of the OS are you using? Please post the output of: pci -v ------------------------------------------ Derek, thans a lot for your help. I'm using QNX 6.4.1 and here's the output of pci -v attached. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post97082 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-11-12T13:25:14Z post97087: RE: RE: RE: Widget flicks if not rectangular Derek Leach http://community.qnx.com/sf/go/post97087 2012-11-12T13:24:33Z 2012-11-12T13:24:33Z Are you using 6.5.0 OS? -----Original Message----- From: Pablo Cepedal [mailto:community-noreply@qnx.com] Sent: November-12-12 5:57 AM To: photon-graphics Subject: Re: RE: RE: Widget flicks if not rectangular Ok, that is the problem, I would expect svga to work better, because it has a backbuffer. What version of the OS are you using? Please post the output of: pci -v ------------------------------------------ Derek, thans a lot for your help. I'm using QNX 6.4.1 and here's the output of pci -v attached. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post97082 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-11-12T13:24:33Z post97082: Re: RE: RE: Widget flicks if not rectangular Pablo Cepedal http://community.qnx.com/sf/go/post97082 2012-11-12T10:56:51Z 2012-11-12T10:56:51Z Ok, that is the problem, I would expect svga to work better, because it has a backbuffer. What version of the OS are you using? Please post the output of: pci -v ------------------------------------------ Derek, thans a lot for your help. I'm using QNX 6.4.1 and here's the output of pci -v attached. Pablo Cepedal 2012-11-12T10:56:51Z post97062: RE: RE: RE: Widget flicks if not rectangular Derek Leach http://community.qnx.com/sf/go/post97062 2012-11-09T20:39:36Z 2012-11-09T20:39:36Z Ok, that is the problem, I would expect svga to work better, because it has a backbuffer. What version of the OS are you using? Please post the output of: pci -v -----Original Message----- From: Pablo Cepedal [mailto:community-noreply@qnx.com] Sent: November-09-12 3:36 PM To: photon-graphics Subject: Re: RE: RE: Widget flicks if not rectangular > Ok, you should not need PmMemoryContext_t at all, just the > PtOSContainer as the parent of the PtRaw. What graphics driver are you using? I've tried svga and vesabios. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post97060 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-11-09T20:39:36Z post97060: Re: RE: RE: Widget flicks if not rectangular Pablo Cepedal http://community.qnx.com/sf/go/post97060 2012-11-09T20:36:01Z 2012-11-09T20:36:01Z > Ok, you should not need PmMemoryContext_t at all, just the PtOSContainer as > the parent of the PtRaw. What graphics driver are you using? I've tried svga and vesabios. Pablo Cepedal 2012-11-09T20:36:01Z post97058: RE: RE: Widget flicks if not rectangular Derek Leach http://community.qnx.com/sf/go/post97058 2012-11-09T20:18:54Z 2012-11-09T20:18:54Z Ok, you should not need PmMemoryContext_t at all, just the PtOSContainer as the parent of the PtRaw. What graphics driver are you using? -----Original Message----- From: Pablo Cepedal [mailto:community-noreply@qnx.com] Sent: November-09-12 3:17 PM To: photon-graphics Subject: Re: RE: Widget flicks if not rectangular That's the way I did before, but it didn't fix the problem, I gues because I was still using PmMemoryContext_t. I'm trying with PdOffscreenContext_t and it seems to help with the flick in the label widgets but now the PtRaw widget started blinking. I guess it still needs some workaround migrating from PmMemoryContext_t to PdOffscreenContext_t. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post97057 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-11-09T20:18:54Z post97057: Re: RE: Widget flicks if not rectangular Pablo Cepedal http://community.qnx.com/sf/go/post97057 2012-11-09T20:17:18Z 2012-11-09T20:17:18Z That's the way I did before, but it didn't fix the problem, I gues because I was still using PmMemoryContext_t. I'm trying with PdOffscreenContext_t and it seems to help with the flick in the label widgets but now the PtRaw widget started blinking. I guess it still needs some workaround migrating from PmMemoryContext_t to PdOffscreenContext_t. Pablo Cepedal 2012-11-09T20:17:18Z post97054: Re: Widget flicks if not rectangular Pablo Cepedal http://community.qnx.com/sf/go/post97054 2012-11-09T19:57:38Z 2012-11-09T19:57:38Z So, you are saying I should use PdOffscreenContext_t instead? I'll try that. Thx. Pablo Cepedal 2012-11-09T19:57:38Z post97055: RE: Widget flicks if not rectangular Derek Leach http://community.qnx.com/sf/go/post97055 2012-11-09T19:54:52Z 2012-11-09T19:54:52Z No, I am say to make a PtOSContainer widget, then make the PtOSContainer widget the parent of the PtRaw widget. -----Original Message----- From: Pablo Cepedal [mailto:community-noreply@qnx.com] Sent: November-09-12 2:58 PM To: photon-graphics Subject: Re: Widget flicks if not rectangular So, you are saying I should use PdOffscreenContext_t instead? I'll try that. Thx. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post97054 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-11-09T19:54:52Z post97053: RE: Widget flicks if not rectangular Derek Leach http://community.qnx.com/sf/go/post97053 2012-11-09T18:50:46Z 2012-11-09T18:50:46Z Yes, there is a separate PtOSContainer widget, make it the parent of the PtRaw, do not use the PmMemoryContext_t. -----Original Message----- From: Pablo Cepedal [mailto:community-noreply@qnx.com] Sent: November-09-12 1:49 PM To: photon-graphics Subject: Re: Widget flicks if not rectangular Misha, I've tried putting the raw widget inside a PtOSContainer but the widgets still flicks. I'm using a PmMemoryContext_t to do the offscreen drawing with PmMemStart() and PmMemStop() and flushing it into a PhImage_t. The draw function of the raw widget uses PgDrawPhImage to flush the image into the widget and sets the new values of the label widgets with PtSetResource. I've also tried with PtHold() and PtRelease() but that didn't work either. Is there any other workaround? Am I missing some PtOSContainer operation? Thanks again. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post97052 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-11-09T18:50:46Z post97052: Re: Widget flicks if not rectangular Pablo Cepedal http://community.qnx.com/sf/go/post97052 2012-11-09T18:49:23Z 2012-11-09T18:49:23Z Misha, I've tried putting the raw widget inside a PtOSContainer but the widgets still flicks. I'm using a PmMemoryContext_t to do the offscreen drawing with PmMemStart() and PmMemStop() and flushing it into a PhImage_t. The draw function of the raw widget uses PgDrawPhImage to flush the image into the widget and sets the new values of the label widgets with PtSetResource. I've also tried with PtHold() and PtRelease() but that didn't work either. Is there any other workaround? Am I missing some PtOSContainer operation? Thanks again. Pablo Cepedal 2012-11-09T18:49:23Z post97050: Re: Widget flicks if not rectangular Pablo Cepedal http://community.qnx.com/sf/go/post97050 2012-11-09T18:35:43Z 2012-11-09T18:35:43Z Thanks for the quick answer. I'll try that and tell you how it went. Pablo Cepedal 2012-11-09T18:35:43Z post97049: Re: Widget flicks if not rectangular Misha Nefedov http://community.qnx.com/sf/go/post97049 2012-11-09T18:33:44Z 2012-11-09T18:33:44Z Put your raw widget inside of a PtOSContainer widget. Misha Nefedov 2012-11-09T18:33:44Z post97048: Widget flicks if not rectangular Pablo Cepedal http://community.qnx.com/sf/go/post97048 2012-11-09T18:30:26Z 2012-11-09T18:30:26Z Hi, i'm new to Photon developing and I have a problem with my app. I'm using a PtRaw widget to display some graphic made with Photon functions such as PgDrawPolygon, etc. The raw widget is damaged (and therefore, redrawn) every 200ms with a timer_cb. The raw widget's width and height is the same as the app window. On top of the raw widget there are some other widgets as labels that update their value every 200ms too. The problem is that those labels that have rectangular borders are ok but those that have an image background (Pt_ARG_LABEL_IMAGE) or rounded borders (Pt_ARG_HIGHLIGHT_ROUNDNESS) flick when the raw widget beneath them damages. I've tried to fix that by changing some flags but didn't get anywhere. I'm trying to work it out using layers but I don't know if that's a possible solution. Is there any other way to avoid this? If it is, how can I know if my HW supports layers? Thanks in advance. Pablo Cepedal 2012-11-09T18:30:26Z post96927: Re: PDF reader for Photon GUI Kapil Gadgil(deleted) http://community.qnx.com/sf/go/post96927 2012-11-07T08:25:54Z 2012-11-07T08:25:54Z Hi Mike, I have implemented horizontal scrollbar using PtScrollContainer and it works fine. Please tell me where in the code has Home ,End , page Up ,page down ,arrow up and down event been handled. I went through the code but couldn't find it. Kapil Gadgil(deleted) 2012-11-07T08:25:54Z post96817: Display horizontal/vertical scale on a trend graph ? KB(deleted) http://community.qnx.com/sf/go/post96817 2012-11-02T22:22:44Z 2012-11-02T22:22:44Z Hi, I would like to know if there is a flag to set or maybe a function to call in order to display the scale on a trend graph grid? If not what are my options? (labels, raw widget, ... ?) My final goal is to display a spectrum of 1024 samples with zoom capability. Besides, I would like to add vertical and horizontal cursors on the trend too and to display the coordinates of each sample when I put the cursor on the spectrum. I guess the trend widget does not fit my goal (I blow my mind to try to zoom on the X-scale! ) and that I will have to code my own widget in order to achieve that :| Or maybe with a raw widget and few functions such as PgDrawTrend], PgDrawPixelArray, PgDrawPolygon and so on ... What do you think about it ? I'm a little confused here Any tip, link or snippet of code would be appreciated! KB(deleted) 2012-11-02T22:22:44Z post96744: Re: PDF reader for Photon GUI Kapil Gadgil(deleted) http://community.qnx.com/sf/go/post96744 2012-11-01T11:44:59Z 2012-11-01T11:44:59Z Hi Mike, I cannot scroll horizontally in this binary. I read from a few sources that h j k l are shortcut keys to scroll horizontally in MuPDF Viewer. Are there any other keys to horizontally scroll the document or a horizontal scroll bar needs to be implemented through code. Kapil Gadgil(deleted) 2012-11-01T11:44:59Z post96319: Re: PDF reader for Photon GUI Mike Gorchak(deleted) http://community.qnx.com/sf/go/post96319 2012-10-15T07:59:47Z 2012-10-15T07:59:47Z > I have built it on QNX 6.4.0 and its great. > There were a few compilation errors ,however i fixed it and the binary is > running great. Great! Mike Gorchak(deleted) 2012-10-15T07:59:47Z post96268: Re: RE: Widescreen resolution manivelan muthusamy http://community.qnx.com/sf/go/post96268 2012-10-11T20:30:09Z 2012-10-11T20:30:09Z We have developed UI with photon on the 6.5 inch diagonal display (640 x 480 resolution; 132.48 (H) x 99.36 (V) mm display area) and now changed display to 9 inch wide screen (800 x 480 resolution; 196.8 (H) × 118.08 (V) mm display area). I have modified display configuration to wide screen resolution and it works fine. But the screens are displayed in the 6 inch display area and obviously looking to display in the 9 inch display area. Is there configuration to stretch the screen layout or rescaling the all the widgets in the photon to is the only way around?. manivelan muthusamy 2012-10-11T20:30:09Z post96049: Re: PDF reader for Photon GUI Kapil Gadgil(deleted) http://community.qnx.com/sf/go/post96049 2012-10-05T08:03:21Z 2012-10-05T08:03:21Z Hi Mike, I have built it on QNX 6.4.0 and its great. There were a few compilation errors ,however i fixed it and the binary is running great. Currently I am trying to improve its performance on our machine. Please do share your inputs too. Regards, Kapil Gadgil(deleted) 2012-10-05T08:03:21Z post95907: Re: PDF reader for Photon GUI Mike Gorchak(deleted) http://community.qnx.com/sf/go/post95907 2012-09-28T08:20:45Z 2012-09-28T08:20:45Z > Thanks for the details.It was helpfull. > I checked the libraries,executable , everything seems to be ok. > > Does this Reader run on QNX 6.4.0 . I was excuting this on 6.5 and 6.4.0 . The > issue is with 6.4.0 > In case this wont execute on 6.4 then do you have any previous version of this > reader that is compatible with 6.4 It works for me on 6.4.1 and 6.5. But I think it must be re-complied under 6.4.0 to get it working. GUI of the reader uses alpha blending for icons to show soft shadows under the picture. Looks at the bottom of gear icon, for example. I do not remember if 6.4 supports alpha blending through the PhImage_t settings or not. Mike Gorchak(deleted) 2012-09-28T08:20:45Z post95906: Re: PDF reader for Photon GUI Kapil Gadgil(deleted) http://community.qnx.com/sf/go/post95906 2012-09-28T04:19:00Z 2012-09-28T04:19:00Z Hi Mike, Thanks for the details.It was helpfull. I checked the libraries,executable , everything seems to be ok. Does this Reader run on QNX 6.4.0 . I was excuting this on 6.5 and 6.4.0 . The issue is with 6.4.0 In case this wont execute on 6.4 then do you have any previous version of this reader that is compatible with 6.4 Regards, Kapil Gadgil(deleted) 2012-09-28T04:19:00Z post95879: Re: PDF reader for Photon GUI Mike Gorchak(deleted) http://community.qnx.com/sf/go/post95879 2012-09-27T13:31:54Z 2012-09-27T13:31:54Z > I am building the source code for which I had put a query previously. Also I > had executed the binary provided by you. If you are still experiencing problems with building, I uploaded 1.1 version to github and you can obtain generic 1.1 version at http://code.google.com/p/mupdf/downloads/detail?name=mupdf-1.1-source.tar.gz&can=2&q= and then we will try to compile it at both sides step by step. > I am trying to execute the same exe on another machine where the difrence is > in binaries and libs in the /usr/bin and /usr/lib and other system folder. If you have noticed, the archive mupdf-1.0-src.tar.gz as well as mupdf-1.1-src.tar.gz contain 3rdparty directory, which has headers and pre-compiled static libraries of all things, which are required to build phmupdf on QNX: libz.a libpng15.a libopenjpeg.a libjpeg.a libjbig2dec.a libfreetype.a libbz2.a Final phmupdf binary only depends on: 1) libph.so.3 2) libm.so.2 3) libc.so.3 4) libfont.so.1 which are all QNX system libraries, available even in runtime only installation. > The binary does not run and gves a memory fault.I am able to run other photon > applications on my machine. > I suspect some library dependency specific to this binary which is not being > met. How phmupdf binary was copied to this machine ? If through the network, like FTP, please make sure that binary transfer mode has been enabled before. Could you check checksum of both binaries with cksum utility: "cksum phmupdf"? Mike Gorchak(deleted) 2012-09-27T13:31:54Z post95877: RE: PDF reader for Photon GUI Derek Leach http://community.qnx.com/sf/go/post95877 2012-09-27T12:59:47Z 2012-09-27T12:59:47Z Use: DL_DEBUG=libs your_app It will tell if any libs are missing. -----Original Message----- From: Kapil Gadgil [mailto:community-noreply@qnx.com] Sent: September-27-12 5:03 AM To: photon-graphics Cc: neha6.b@tcs.com Subject: Re: PDF reader for Photon GUI Hi Mike, The PDF Reader is excellent Thanks a lott for this. I am building the source code for which I had put a query previously. Also I had executed the binary provided by you. I had a query regarding this . I executed this on my self hosted machine. I am trying to execute the same exe on another machine where the difrence is in binaries and libs in the /usr/bin and /usr/lib and other system folder. The binary does not run and gves a memory fault.I am able to run other photon applications on my machine. I suspect some library dependency specific to this binary which is not being met. Could you tell me the library or other dependencies this executable has.This would be very helpull. Regards, _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post95871 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-09-27T12:59:47Z post95871: Re: PDF reader for Photon GUI Kapil Gadgil(deleted) http://community.qnx.com/sf/go/post95871 2012-09-27T09:03:20Z 2012-09-27T09:03:20Z Hi Mike, The PDF Reader is excellent Thanks a lott for this. I am building the source code for which I had put a query previously. Also I had executed the binary provided by you. I had a query regarding this . I executed this on my self hosted machine. I am trying to execute the same exe on another machine where the difrence is in binaries and libs in the /usr/bin and /usr/lib and other system folder. The binary does not run and gves a memory fault.I am able to run other photon applications on my machine. I suspect some library dependency specific to this binary which is not being met. Could you tell me the library or other dependencies this executable has.This would be very helpull. Regards, Kapil Gadgil(deleted) 2012-09-27T09:03:20Z post95833: Re: PDF reader for Photon GUI Kapil Gadgil(deleted) http://community.qnx.com/sf/go/post95833 2012-09-26T12:40:00Z 2012-09-26T12:40:00Z Hi, I downloaded the image 1.0 and palced your code(obtained from https://github.com/llmike/PhMuPDF/downloads) During make I got the following errors- fitz/image_jpx.c: In function 'fz_load_jpx': fitz/image_jpx.c:27: error: 'opj_event_mgr_t' undeclared (first use in this function) fitz/image_jpx.c:27: error: (Each undeclared identifier is reported only once fitz/image_jpx.c:27: error: for each function it appears in.) fitz/image_jpx.c:27: error: expected ';' before 'evtmgr' etc ... The details are attached in the snapshot. Kindly help on this. I am running this in the /MuPdf directory on QNX 6 Self Hosted machine. Regards, Kapil Gadgil(deleted) 2012-09-26T12:40:00Z post94876: Re: PDF reader for Photon GUI Mike Gorchak(deleted) http://community.qnx.com/sf/go/post94876 2012-08-16T09:44:11Z 2012-08-16T09:44:11Z Hi, You have to obtain generic sources for mupdf at http://git.ghostscript.com/?p=mupdf.git;a=summary , please use version 1.0, not latest sources. Or just download 1.0 snapshot at http://code.google.com/p/mupdf/downloads/detail?name=mupdf-1.0-source.tar.gz&can=2&q= . Extract my sources to the directory with mupdf sources. Type "make -f Makefile.qnx". Enjoy. Mike Gorchak(deleted) 2012-08-16T09:44:11Z post94690: RE: RE: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Derek Leach http://community.qnx.com/sf/go/post94690 2012-08-08T13:55:49Z 2012-08-08T13:55:49Z Ok, thx. -----Original Message----- From: Frank Applin [mailto:community-noreply@qnx.com] Sent: August-08-12 9:37 AM To: photon-graphics@community.qnx.com Subject: Re: RE: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Hi Derek, I have gotten some code from Dennis at QNX. Just trying to work out why the interval expiration time doesn't seem to be working. Thanks, Frank   ======================================================================= The price of greatness is responsibility. - Winston Churchill ----- Original Message ----- From: Derek Leach <community-noreply@qnx.com> To: "'photon-graphics@community.qnx.com'" <photon-graphics@community.qnx.com> Cc: Sent: Wednesday, August 8, 2012 9:23 AM Subject: RE: RE: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label When I get a moment, I will try and locate some code. Regards. -----Original Message----- From: Frank Applin [mailto:community-noreply@qnx.com] Sent: August-06-12 10:40 AM To: photon-graphics Subject: Re: RE: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Hey Derek, I know it's been a while, but I did get my first experiment protocol running using the PtTimer. It's accurate to about 2 ms, which isn't bad at all. I was wondering, though, if, now, you could please show me just a simple example of using RtTimer (RtTimerCreate and RtTimerSetTimer). Thanks, Frank _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94657 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94688 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94689 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-08-08T13:55:49Z post94689: Re: RE: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Frank Applin http://community.qnx.com/sf/go/post94689 2012-08-08T13:39:36Z 2012-08-08T13:39:36Z Hi Derek, I have gotten some code from Dennis at QNX. Just trying to work out why the interval expiration time doesn't seem to be working. Thanks, Frank   ======================================================================= The price of greatness is responsibility. - Winston Churchill ----- Original Message ----- From: Derek Leach <community-noreply@qnx.com> To: "'photon-graphics@community.qnx.com'" <photon-graphics@community.qnx.com> Cc: Sent: Wednesday, August 8, 2012 9:23 AM Subject: RE: RE: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label When I get a moment, I will try and locate some code. Regards. -----Original Message----- From: Frank Applin [mailto:community-noreply@qnx.com] Sent: August-06-12 10:40 AM To: photon-graphics Subject: Re: RE: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Hey Derek, I know it's been a while, but I did get my first experiment protocol running using the PtTimer. It's accurate to about 2 ms, which isn't bad at all. I was wondering, though, if, now, you could please show me just a simple example of using RtTimer (RtTimerCreate and RtTimerSetTimer). Thanks, Frank _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94657 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94688 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Frank Applin 2012-08-08T13:39:36Z post94688: RE: RE: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Derek Leach http://community.qnx.com/sf/go/post94688 2012-08-08T13:25:54Z 2012-08-08T13:25:54Z When I get a moment, I will try and locate some code. Regards. -----Original Message----- From: Frank Applin [mailto:community-noreply@qnx.com] Sent: August-06-12 10:40 AM To: photon-graphics Subject: Re: RE: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Hey Derek, I know it's been a while, but I did get my first experiment protocol running using the PtTimer. It's accurate to about 2 ms, which isn't bad at all. I was wondering, though, if, now, you could please show me just a simple example of using RtTimer (RtTimerCreate and RtTimerSetTimer). Thanks, Frank _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94657 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-08-08T13:25:54Z post94670: Re: PDF reader for Photon GUI Kapil Gadgil(deleted) http://community.qnx.com/sf/go/post94670 2012-08-07T12:40:21Z 2012-08-07T12:40:21Z I downloaded the src at the link. However I am not able to build the same. Kindly tell me the steps . Kapil Gadgil(deleted) 2012-08-07T12:40:21Z post94657: Re: RE: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Frank Applin http://community.qnx.com/sf/go/post94657 2012-08-06T14:39:59Z 2012-08-06T14:39:59Z Hey Derek, I know it's been a while, but I did get my first experiment protocol running using the PtTimer. It's accurate to about 2 ms, which isn't bad at all. I was wondering, though, if, now, you could please show me just a simple example of using RtTimer (RtTimerCreate and RtTimerSetTimer). Thanks, Frank Frank Applin 2012-08-06T14:39:59Z post94564: Data entry verification Frank Applin http://community.qnx.com/sf/go/post94564 2012-08-01T15:33:21Z 2012-08-01T15:33:21Z Hi, I have several text fields on a dialog that I have to ensure are all filled in. I would like to check them all in the Done callback (when they click on a Done button). I will display a message informing them of what needs correcting. I don't see how you can keep the dialog from closing, though. I see an example of preventing someone from closing via the menu or 'x' button (and if they do want to close - it exits the application - not just the dialog). So, can someone help with this? Thanks, Frank Frank Applin 2012-08-01T15:33:21Z post94467: Re: RE: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Frank Applin http://community.qnx.com/sf/go/post94467 2012-07-28T03:25:11Z 2012-07-28T03:25:11Z OK. I'll head down that path, first. Thanks again for your patience and help. Frank Frank Applin 2012-07-28T03:25:11Z post94466: RE: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Derek Leach http://community.qnx.com/sf/go/post94466 2012-07-28T03:20:42Z 2012-07-28T03:20:42Z It is the Advance Graphics Framework APIs. It is low level draw API calls, and is more synchronous in nature (no main loop). OK, if you want it all in one app, then get it up and running with PtTimer, then recode to RtTimer. The only reason I am suggesting to use the PtTimer first, is because it is easier, and you can work out all the logic first. -----Original Message----- From: Frank Applin [mailto:community-noreply@qnx.com] Sent: July-27-12 11:12 PM To: photon-graphics Subject: Re: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Forgive my ignorance, but what is GF? I would like to keep it all in one application if I can. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94465 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-07-28T03:20:42Z post94465: Re: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Frank Applin http://community.qnx.com/sf/go/post94465 2012-07-28T03:12:00Z 2012-07-28T03:12:00Z Forgive my ignorance, but what is GF? I would like to keep it all in one application if I can. Frank Applin 2012-07-28T03:12:00Z post94464: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Derek Leach http://community.qnx.com/sf/go/post94464 2012-07-28T03:04:13Z 2012-07-28T03:04:13Z Since you are looking for 'synchronous' updates of the images, have you considered going straight to the metal and use GF instead? Or are you hoping to have all the buttons and such in the same application as the image display? -----Original Message----- From: Frank Applin [mailto:community-noreply@qnx.com] Sent: July-27-12 10:59 PM To: photon-graphics Subject: Re: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Yes I am. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94463 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-07-28T03:04:13Z post94463: Re: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Frank Applin http://community.qnx.com/sf/go/post94463 2012-07-28T02:59:02Z 2012-07-28T02:59:02Z Yes I am. Frank Applin 2012-07-28T02:59:02Z post94461: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Derek Leach http://community.qnx.com/sf/go/post94461 2012-07-28T02:51:09Z 2012-07-28T02:51:09Z Yes it does. Are you using QNX650? -----Original Message----- From: Frank Applin [mailto:community-noreply@qnx.com] Sent: July-27-12 10:49 PM To: photon-graphics Subject: Re: RE: RE: RE: AW: RE: RE: How to swap images using a label Hi Derek, First, thank you for taking your time to be so helpful. These are going to need to be accurate to within a few milliseconds. The caveat that I don't know if I mentioned in a previous post or not is that before and after the image is displayed I will be sending a short pulse to a parallel port line connected to a PC running EEG software. So, if an image is displayed for 2025 milliseconds - we want to be able to look at the EEG between the parallel port pulses (called events in the EEG world) and hopefully it's damn close to 2025 milliseconds. Does that answer your question? Frank _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94460 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-07-28T02:51:09Z post94460: Re: RE: RE: RE: AW: RE: RE: How to swap images using a label Frank Applin http://community.qnx.com/sf/go/post94460 2012-07-28T02:49:01Z 2012-07-28T02:49:01Z Hi Derek, First, thank you for taking your time to be so helpful. These are going to need to be accurate to within a few milliseconds. The caveat that I don't know if I mentioned in a previous post or not is that before and after the image is displayed I will be sending a short pulse to a parallel port line connected to a PC running EEG software. So, if an image is displayed for 2025 milliseconds - we want to be able to look at the EEG between the parallel port pulses (called events in the EEG world) and hopefully it's damn close to 2025 milliseconds. Does that answer your question? Frank Frank Applin 2012-07-28T02:49:01Z post94458: RE: RE: RE: AW: RE: RE: How to swap images using a label Derek Leach http://community.qnx.com/sf/go/post94458 2012-07-28T02:19:15Z 2012-07-28T02:19:15Z How "accurate" do you need? I understand your requirement for the delays, but how close to these delay values is necessary? PtTimer in most cases is feasible. I would get it all running with a PtTimer, with a fine repeat, then check in the callback against your delay values, and decide whether to swap the image or not. It will not be a waste of time, as you could reuse a lot of the code with the RtTimer, if it is really necessary. -----Original Message----- From: Frank Applin [mailto:community-noreply@qnx.com] Sent: July-27-12 10:03 PM To: photon-graphics Subject: Re: RE: RE: AW: RE: RE: How to swap images using a label I guess this comes down to a design question then. Should I be displaying the images (I'm assuming using RtTimer because I need accuracy) in a separate thread, in background process, in work procedure, or in some other method that I haven't read up on, yet? A user will basically be clicking on a Start Button of a simple dialog to open this new dialog that displays the images for the staggered amount of times (read in from the file and stored in some global structure at the start of the application). Thanks. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94457 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-07-28T02:19:15Z post94457: Re: RE: RE: AW: RE: RE: How to swap images using a label Frank Applin http://community.qnx.com/sf/go/post94457 2012-07-28T02:02:39Z 2012-07-28T02:02:39Z I guess this comes down to a design question then. Should I be displaying the images (I'm assuming using RtTimer because I need accuracy) in a separate thread, in background process, in work procedure, or in some other method that I haven't read up on, yet? A user will basically be clicking on a Start Button of a simple dialog to open this new dialog that displays the images for the staggered amount of times (read in from the file and stored in some global structure at the start of the application). Thanks. Frank Applin 2012-07-28T02:02:39Z post94480: Re: RE: RE: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Frank Applin http://community.qnx.com/sf/go/post94480 2012-07-27T17:49:56Z 2012-07-27T17:49:56Z Thanks, again, Derek. That works. I'll work on the image part next. Have a great weekend! Frank Frank Applin 2012-07-27T17:49:56Z post94474: RE: RE: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Derek Leach http://community.qnx.com/sf/go/post94474 2012-07-27T16:32:13Z 2012-07-27T16:32:13Z You want: PtSetResource(ABW_PtTimerImage, Pt_ARG_TIMER_INITIAL, 5000, 0); And if you want a repeat: PtSetResource(ABW_PtTimerImage, Pt_ARG_TIMER_REPEAT, 5000, 0); In the lines below you are setting the callback resource to reference the PtCallback_t pointer (void *)Pt_TIMER_INITIAL, which is just a number constant, which causes the crash. -----Original Message----- From: Frank Applin [mailto:community-noreply@qnx.com] Sent: July-27-12 11:48 AM To: photon-graphics Subject: Re: RE: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Hi Derek, I hate to ask such basic questions, but the documentation is seriously lacking in example code. I created a base dialog with a PtTimer and a button on it. PtTimerImage has an initial value of 0 and a repeat value of 1. The Activate callback is called DisplayImage (just using printf(), now). PtButtonStart has an Activate callback named StartTimer. What I am trying to accomplish in this little test program is that when I click the Start button, the timer's initial value is set to 5000 which should then call the DisplayImage callback (if I'm understanding this correctly). In the DisplayImage callback - I want to display the time of day and re-set the initial value of the timer to 1000. So, the code for the StartTimer callback looks like: PtSetResource(ABW_PtTimerImage, Pt_CB_TIMER_ACTIVATE, Pt_TIMER_INITIAL, 5000); The code for the DisplayImage callback looks like: printf("here\n"); time_of_day = time(NULL); printf("It is now: %s\n", ctime(&time_of_day)); PtSetResource(ABW_PtTimerImage, Pt_CB_TIMER_ACTIVATE, Pt_TIMER_INITIAL, 1000); It builds fine and when I run it from a terminal console - the dialog appears, I click Start, and I get a memory fault. Can you help starighten me out, please? Frank _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94473 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-07-27T16:32:13Z post94473: Re: RE: RE: RE: RE: RE: RE: AW: RE: RE: How to swap images using a label Frank Applin http://community.qnx.com/sf/go/post94473 2012-07-27T15:47:30Z 2012-07-27T15:47:30Z Hi Derek, I hate to ask such basic questions, but the documentation is seriously lacking in example code. I created a base dialog with a PtTimer and a button on it. PtTimerImage has an initial value of 0 and a repeat value of 1. The Activate callback is called DisplayImage (just using printf(), now). PtButtonStart has an Activate callback named StartTimer. What I am trying to accomplish in this little test program is that when I click the Start button, the timer's initial value is set to 5000 which should then call the DisplayImage callback (if I'm understanding this correctly). In the DisplayImage callback - I want to display the time of day and re-set the initial value of the timer to 1000. So, the code for the StartTimer callback looks like: PtSetResource(ABW_PtTimerImage, Pt_CB_TIMER_ACTIVATE, Pt_TIMER_INITIAL, 5000); The code for the DisplayImage callback looks like: printf("here\n"); time_of_day = time(NULL); printf("It is now: %s\n", ctime(&time_of_day)); PtSetResource(ABW_PtTimerImage, Pt_CB_TIMER_ACTIVATE, Pt_TIMER_INITIAL, 1000); It builds fine and when I run it from a terminal console - the dialog appears, I click Start, and I get a memory fault. Can you help starighten me out, please? Frank Frank Applin 2012-07-27T15:47:30Z post94450: RE: RE: AW: RE: RE: How to swap images using a label Steve Reid http://community.qnx.com/sf/go/post94450 2012-07-26T19:43:33Z 2012-07-26T19:43:33Z I'm a bit rusty on Photon, as it's been a while since I worked on those docs. If you call delay() or something like that in a callback, you're delaying the processing of events by PtMainLoop(), which isn't a good idea, as your entire program--including the processing of mouse buttons, the refreshing of windows, and so on--is delayed. PtTimer and the RtTimer* functions work correctly with the event loop. As I recall, the inaccuracy can happen because the expiry of the timer joins any other events that are already in the event queue. If you're doing a simple animation where the delays are in seconds, PtTimer is probably good enough. If you need hard realtime, especially with very short delays, you need to use a timer in a separate process that doesn't use the Photon event loop. You can change the delay by resetting Pt_ARG_TIMER_INITIAL to the next delay, in the timer's Pt_CB_TIMER_ACTIVATE callback. Some of the people who are monitoring this forum know this stuff a lot better than I do, so I hope they'll correct me if I got something wrong. Steve Reid (stever@qnx.com) Technical Editor QNX Software Systems -----Original Message----- From: Frank Applin [mailto:community-noreply@qnx.com] Sent: Thursday, July 26, 2012 2:49 PM To: photon-graphics Subject: Re: RE: AW: RE: RE: How to swap images using a label Steve do you have a suggestion for the staggered delays I'll need for how long the image is displayed? A couple of the guys on here have suggested PtTimer, but the documentation said it's not very accurate (use RtTimer instead). Why couldn't i use uSleep() or delay() kind of function to hold the image on the screen for a specified period of time? Thanks again for the help. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94448 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Steve Reid 2012-07-26T19:43:33Z post94444: RE: AW: RE: RE: How to swap images using a label Steve Reid http://community.qnx.com/sf/go/post94444 2012-07-26T18:56:42Z 2012-07-26T18:56:42Z There's an example of this in the Photon Programmer's Guide. See "Animation" in this file: http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=/com.qnx.doc.photon_prog_guide/draw.html Steve Reid (stever@qnx.com) Technical Editor QNX Software Systems -----Original Message----- From: Frank Applin [mailto:community-noreply@qnx.com] Sent: Thursday, July 26, 2012 2:24 PM To: photon-graphics Subject: Re: AW: RE: RE: How to swap images using a label I will say this for Microsoft, though. Their documentation is chalked full of examples, which make learning a new tool set and APIs much, much easier. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94442 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Steve Reid 2012-07-26T18:56:42Z post94447: Re: RE: AW: RE: RE: How to swap images using a label Frank Applin http://community.qnx.com/sf/go/post94447 2012-07-26T18:50:53Z 2012-07-26T18:50:53Z Thanks, Steve!! That is very useful! Frank Frank Applin 2012-07-26T18:50:53Z post94448: Re: RE: AW: RE: RE: How to swap images using a label Frank Applin http://community.qnx.com/sf/go/post94448 2012-07-26T18:48:36Z 2012-07-26T18:48:36Z Steve do you have a suggestion for the staggered delays I'll need for how long the image is displayed? A couple of the guys on here have suggested PtTimer, but the documentation said it's not very accurate (use RtTimer instead). Why couldn't i use uSleep() or delay() kind of function to hold the image on the screen for a specified period of time? Thanks again for the help. Frank Applin 2012-07-26T18:48:36Z post94443: RE: AW: RE: RE: How to swap images using a label Derek Leach http://community.qnx.com/sf/go/post94443 2012-07-26T18:31:18Z 2012-07-26T18:31:18Z You have read the Photon Programmers Guide? Yes, there could be more docs. -----Original Message----- From: Frank Applin [mailto:community-noreply@qnx.com] Sent: July-26-12 2:24 PM To: photon-graphics Subject: Re: AW: RE: RE: How to swap images using a label I will say this for Microsoft, though. Their documentation is chalked full of examples, which make learning a new tool set and APIs much, much easier. _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94442 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-07-26T18:31:18Z post94442: Re: AW: RE: RE: How to swap images using a label Frank Applin http://community.qnx.com/sf/go/post94442 2012-07-26T18:24:18Z 2012-07-26T18:24:18Z I will say this for Microsoft, though. Their documentation is chalked full of examples, which make learning a new tool set and APIs much, much easier. Frank Applin 2012-07-26T18:24:18Z post94439: Re: AW: RE: RE: How to swap images using a label Frank Applin http://community.qnx.com/sf/go/post94439 2012-07-26T18:00:00Z 2012-07-26T18:00:00Z Thanks, guys. I am really new to this (just installed Neutrino, yesterday) and this isn't your normal C/C++/C#/Java event handling coding. So, let me look at the PtTimer and try to absorb what you are talking about. Should I even be attempting this via PhAB? Frank Frank Applin 2012-07-26T18:00:00Z post94437: RE: RE: How to swap images using a label Derek Leach http://community.qnx.com/sf/go/post94437 2012-07-26T17:58:04Z 2012-07-26T17:58:04Z Ok, the key is that the Photon processing is not immediate in the callback versus what you see on the display, so if you set image1 then image2, you will only ever see image2. You never want to stall out in the middle of a callback. What you want to do is of a rather synchronous nature, with non-equal delay time. With a Photon app the PtMainLoop() is already running. There are more hacker ways of going about this, but could you try setting the PtTimer to a really fine repeat, then check your delays in there? If not, I will have to think about this for a bit. -----Original Message----- From: Frank Applin [mailto:community-noreply@qnx.com] Sent: July-26-12 1:39 PM To: photon-graphics Subject: Re: RE: How to swap images using a label Would I be able to change the timer to something that is not a set time? What I am after is to be able to read a simple text file that has bitmap names and timings (usually in ms). This kind of stuff is done in psychology experiments with EEG. You show an image for a period of time and delay. Move to the next picture with a new period of time (just slightly staggered) and delay. And it keeps doing this process all the way through the file. So, the text file might look like: beagle.bmp, 2000 blank.bmp, 2000 canary.bmp, 2015 blank.bmp, 2000 beagle.bmp, 2045 blank.bmp, 2000 canary.bmp, 2065 blank.bmp, 2000 beagle.bmp, 2100 blank.bmp, 2000 : : _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94436 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-07-26T17:58:04Z post94440: AW: Re: AW: RE: RE: How to swap images using a label Thomas Haupt http://community.qnx.com/sf/go/post94440 2012-07-26T17:54:04Z 2012-07-26T17:54:04Z I'd suggest PhAb. It sets up the code framework for you, lets you drag-and-drop the widgets you want, and also generates code templates for the callbacks you specify. Much easier than doing everything in code yourself. - Thomas ----- Originalnachricht ----- Von: Frank Applin [mailto:community-noreply@qnx.com] Gesendet: Thursday, July 26, 2012 02:00 PM An: photon-graphics <photon-graphics@community.qnx.com> Betreff: Re: AW: RE: RE: How to swap images using a label Thanks, guys. I am really new to this (just installed Neutrino, yesterday) and this isn't your normal C/C++/C#/Java event handling coding. So, let me look at the PtTimer and try to absorb what you are talking about. Should I even be attempting this via PhAB? Frank _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94439 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Thomas Haupt 2012-07-26T17:54:04Z post94438: AW: RE: RE: How to swap images using a label Thomas Haupt http://community.qnx.com/sf/go/post94438 2012-07-26T17:43:35Z 2012-07-26T17:43:35Z I think Derek's suggestion is just right. Set the PtTimer interval to 1ms or so; checking a delay count doesn't generate so much overhead. Try to pre-load the images and delay counts when starting your application (or when opening the definition file). - Thomas ----- Originalnachricht ----- Von: Derek Leach [mailto:community-noreply@qnx.com] Gesendet: Thursday, July 26, 2012 01:30 PM An: photon-graphics <photon-graphics@community.qnx.com> Betreff: RE: RE: How to swap images using a label Ok, the key is that the Photon processing is not immediate in the callback versus what you see on the display, so if you set image1 then image2, you will only ever see image2. You never want to stall out in the middle of a callback. What you want to do is of a rather synchronous nature, with non-equal delay time. With a Photon app the PtMainLoop() is already running. There are more hacker ways of going about this, but could you try setting the PtTimer to a really fine repeat, then check your delays in there? If not, I will have to think about this for a bit. -----Original Message----- From: Frank Applin [mailto:community-noreply@qnx.com] Sent: July-26-12 1:39 PM To: photon-graphics Subject: Re: RE: How to swap images using a label Would I be able to change the timer to something that is not a set time? What I am after is to be able to read a simple text file that has bitmap names and timings (usually in ms). This kind of stuff is done in psychology experiments with EEG. You show an image for a period of time and delay. Move to the next picture with a new period of time (just slightly staggered) and delay. And it keeps doing this process all the way through the file. So, the text file might look like: beagle.bmp, 2000 blank.bmp, 2000 canary.bmp, 2015 blank.bmp, 2000 beagle.bmp, 2045 blank.bmp, 2000 canary.bmp, 2065 blank.bmp, 2000 beagle.bmp, 2100 blank.bmp, 2000 : : _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94436 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94437 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Thomas Haupt 2012-07-26T17:43:35Z post94436: Re: RE: How to swap images using a label Frank Applin http://community.qnx.com/sf/go/post94436 2012-07-26T17:38:41Z 2012-07-26T17:38:41Z Would I be able to change the timer to something that is not a set time? What I am after is to be able to read a simple text file that has bitmap names and timings (usually in ms). This kind of stuff is done in psychology experiments with EEG. You show an image for a period of time and delay. Move to the next picture with a new period of time (just slightly staggered) and delay. And it keeps doing this process all the way through the file. So, the text file might look like: beagle.bmp, 2000 blank.bmp, 2000 canary.bmp, 2015 blank.bmp, 2000 beagle.bmp, 2045 blank.bmp, 2000 canary.bmp, 2065 blank.bmp, 2000 beagle.bmp, 2100 blank.bmp, 2000 : : Frank Applin 2012-07-26T17:38:41Z post94435: RE: How to swap images using a label Derek Leach http://community.qnx.com/sf/go/post94435 2012-07-26T15:57:56Z 2012-07-26T15:57:56Z Setup a PtTimer that checks a "image index" ... after the callback for the PtTimer fires, check the "image index" for what image to display, and set the Pt_ARG_LABEL_IMAGE with that image, then change the "image index". The next time the PtTimer fires, your "image index" will be different, so you would set the other image to the label. Preload the image (PxLoadImage) in an application startup callback, you do not want to keep reloading the images -> slow, and if you do not release, leads to memory leak. -----Original Message----- From: Frank Applin [mailto:community-noreply@qnx.com] Sent: July-26-12 11:51 AM To: photon-graphics Subject: How to swap images using a label Hi, I'm new to QNX and PhAB, but have been programming for 20+ years. I guess I'm most familiar with the Visual Studio paradigm. I am using Neil Carter's example of showing an image using a label. int ShowImage( PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t *cbinfo ) { PhImage_t *myImg; char myImgFlnm[20] = "PICTURE.BMP"; /* eliminate 'unreferenced' warnings */ widget = widget, apinfo = apinfo, cbinfo = cbinfo; if ((myImg = PxLoadImage( myImgFlnm, NULL)) == NULL) { fprintf( stderr, "Error loading image file %s\n", myImgFlnm); PtExit( EXIT_FAILURE ); } PtSetResource(ABW_lblMyImg, Pt_ARG_LABEL_IMAGE, myImg, 0); return( Pt_CONTINUE ); } How can I swap out the current image with another image after a short delay? I tried the following, but it simple shows the 2nd image: int ShowImage( PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t *cbinfo ) { PhImage_t *myImg, *myImg2; char myImgFlnm[20] = "PICTURE.BMP"; char myImgFlnm2[20] = "PICTURE2.BMP"; /* eliminate 'unreferenced' warnings */ widget = widget, apinfo = apinfo, cbinfo = cbinfo; if ((myImg = PxLoadImage( myImgFlnm, NULL)) == NULL) { fprintf( stderr, "Error loading image file %s\n", myImgFlnm); PtExit( EXIT_FAILURE ); } PtSetResource(ABW_lblMyImg, Pt_ARG_LABEL_IMAGE, myImg, 0); delay(5000); /* delay 5 secs */ if ((myImg2 = PxLoadImage( myImgFlnm2, NULL)) == NULL) { fprintf( stderr, "Error loading image file %s\n", myImgFlnm2); PtExit( EXIT_FAILURE ); } PtSetResource(ABW_lblMyImg, Pt_ARG_LABEL_IMAGE, myImg2, 0); return( Pt_CONTINUE ); } Thanks, Frank _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94434 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-07-26T15:57:56Z post94434: How to swap images using a label Frank Applin http://community.qnx.com/sf/go/post94434 2012-07-26T15:50:54Z 2012-07-26T15:50:54Z Hi, I'm new to QNX and PhAB, but have been programming for 20+ years. I guess I'm most familiar with the Visual Studio paradigm. I am using Neil Carter's example of showing an image using a label. int ShowImage( PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t *cbinfo ) { PhImage_t *myImg; char myImgFlnm[20] = "PICTURE.BMP"; /* eliminate 'unreferenced' warnings */ widget = widget, apinfo = apinfo, cbinfo = cbinfo; if ((myImg = PxLoadImage( myImgFlnm, NULL)) == NULL) { fprintf( stderr, "Error loading image file %s\n", myImgFlnm); PtExit( EXIT_FAILURE ); } PtSetResource(ABW_lblMyImg, Pt_ARG_LABEL_IMAGE, myImg, 0); return( Pt_CONTINUE ); } How can I swap out the current image with another image after a short delay? I tried the following, but it simple shows the 2nd image: int ShowImage( PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t *cbinfo ) { PhImage_t *myImg, *myImg2; char myImgFlnm[20] = "PICTURE.BMP"; char myImgFlnm2[20] = "PICTURE2.BMP"; /* eliminate 'unreferenced' warnings */ widget = widget, apinfo = apinfo, cbinfo = cbinfo; if ((myImg = PxLoadImage( myImgFlnm, NULL)) == NULL) { fprintf( stderr, "Error loading image file %s\n", myImgFlnm); PtExit( EXIT_FAILURE ); } PtSetResource(ABW_lblMyImg, Pt_ARG_LABEL_IMAGE, myImg, 0); delay(5000); /* delay 5 secs */ if ((myImg2 = PxLoadImage( myImgFlnm2, NULL)) == NULL) { fprintf( stderr, "Error loading image file %s\n", myImgFlnm2); PtExit( EXIT_FAILURE ); } PtSetResource(ABW_lblMyImg, Pt_ARG_LABEL_IMAGE, myImg2, 0); return( Pt_CONTINUE ); } Thanks, Frank Frank Applin 2012-07-26T15:50:54Z post94380: Sample code to blit to/from PmMemoryContext_t to/from PdOffscreenContext_t Derek Leach http://community.qnx.com/sf/go/post94380 2012-07-23T13:40:38Z 2012-07-23T13:40:38Z The documentation if wrong for PgContextBlitArea*(). One cannot blit to/from any other than a PdOffscreenContext_t with that routine. Attached is code that uses GF to blit to/from PmMemoryContext_t to/from PdOffscreenContext_t. There are three routines: blit_init() blit_deinit() blit_dc_to_dc() It does not necessarily perform an accelerated blit, but exposes the capability of the chipset currently in use. Derek Leach 2012-07-23T13:40:38Z post94345: RE: Transparent Photon background Derek Leach http://community.qnx.com/sf/go/post94345 2012-07-19T17:46:05Z 2012-07-19T17:46:05Z I have not done this approach lately, but try these suggestions. You could set the fill colour to Pg_TRANSPARENT, unless you are using a PtOSContainer. If you are using a PtOSContainer, set the fill colour to something not common, then set the chroma on the layer to that value, and no draw. -----Original Message----- From: Jimmy Townsend [mailto:community-noreply@qnx.com] Sent: July-18-12 3:22 PM To: photon-graphics Subject: Transparent Photon background Is there any way to have Photon's background either not be drawn, or drawn as "transparent"? I'm trying to render some graphics on layer 0, and have some Photon objects overlay them, with Photon on layer 1. The problem is, Photon draws a background which totally obscures what's rendered on layer 0. Thanks! _______________________________________________ Photon microGUI http://community.qnx.com/sf/go/post94334 To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com Derek Leach 2012-07-19T17:46:05Z post94334: Transparent Photon background Don Meyer http://community.qnx.com/sf/go/post94334 2012-07-18T19:22:06Z 2012-07-18T19:22:06Z Is there any way to have Photon's background either not be drawn, or drawn as "transparent"? I'm trying to render some graphics on layer 0, and have some Photon objects overlay them, with Photon on layer 1. The problem is, Photon draws a background which totally obscures what's rendered on layer 0. Thanks! Don Meyer 2012-07-18T19:22:06Z