Sponsored Content
Top Forums Programming Wuhan Coronavirus Status for China - Rapid Prototype Blynk App with ESP8266 Post 303043640 by Neo on Sunday 2nd of February 2020 10:25:57 PM
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Function prototype declaration

Hi All, I have the script as below #!bin/bash let k=9 if then echo "Start" Hello echo "End" else echo "failed" fi function Hello() { echo "hello !!!!" } I got the below error : (4 Replies)
Discussion started by: Balasankar
4 Replies

2. Programming

Embarcadero Rapid SQL query for dependency

Team I am using Embarcadero Rapid SQL V8 . When we right click on any procedure/table/view and open the contents. It has dependencies tab, which tell what all are the dependents used . My question is how does this information captured in backend to retrieve the dependency objects in... (0 Replies)
Discussion started by: Perlbaby
0 Replies

3. What is on Your Mind?

Major Changes in New UserCP (v0.63) Prototype

Regarding the latest version of the UserCP prototype (version 0.63) I have made a lot of major changes, including Added a "Posts Timeline" table for the recent posts, complimenting the non-table version earlier, which has been moved off the main menu (link at the bottom of the table). Added a... (4 Replies)
Discussion started by: Neo
4 Replies

4. Programming

NodeMCU ESP8266 Blynk SSL Application for Linux Server Load Averages

Here is a useful SSL (HTTPS) application for anyone with a remote Linux server they want to keep an eye on using Blynk and the NodeMCU ESP8266. This little app also works (have tested as well) on the WeMos D1 ESP8266 Arduino board. The NodeMCU setup could not be easier, just find a... (8 Replies)
Discussion started by: Neo
8 Replies

5. Programming

Wuhan Coronavirus Status App for China - Rapid Prototype using MQTT and the IoT OnOff IOS App

With a little bit of work, was able to build a nice "Wuhan Coronavirus Status" app using MQTT and the IoT-OnOff app. More on this technique here: ESP32 (ESP-WROOM-32) as an MQTT Client Subscribed to Linux Server Load Average Messages The result turned out nice, I think. I like the look and... (10 Replies)
Discussion started by: Neo
10 Replies

6. Programming

A Slightly Better NTP Client for the ESP8266

Was not really happy with the NTP clients for the ESP8266 because, after a few years of game engine programming, I am not a fan of a lot of code and delays in the main loop, so here is a "slightly better NTP client" for the ESP8266. In a nutshell, instead of having a delay in the main loop as a... (1 Reply)
Discussion started by: Neo
1 Replies
pods::SDLx::App(3pm)					User Contributed Perl Documentation				      pods::SDLx::App(3pm)

NAME
SDLx::App - a SDL perl extension CATEGORY
Extension SYNOPSIS
use SDL; use SDLx::App; use SDL::Event; use SDL::Events; my $app = SDLx::App->new( title => 'Application Title', width => 640, height => 480, depth => 32 ); This is the manual way of doing things my $event = SDL::Event->new; # create a new event SDL::Events::pump_events(); while ( SDL::Events::poll_event($event) ) { my $type = $event->type(); # get event type print $type; exit if $type == SDL_QUIT; } An alternative to the manual Event processing is through the SDLx::Controller module. SDLx::App is a Controller so see the CALLBACKS section below. DESCRIPTION
SDLx::App controls the root window of the of your SDL based application. It extends the SDL::Surface class, and provides an interface to the window manager oriented functions. METHODS
new "SDLx::App::new" initializes the SDL, creates a new screen, and initializes some of the window manager properties. "SDLx::App::new" takes a series of named parameters: o title the window title. Defaults to the file name. Shorter alias: 't' o icon_title the icon title. Defaults to file name. Shortcut: 'it' o icon the icon itself. Defaults to none. Shortcut: 'i' o width Window width, in pixels. Defaults to 800. Shortcut: 'w' o height Window height, in pixels. Defaults to 600. Shortcut: 'h' o depth Screen depth. Defaults to 16. Shortcut: 'd'. o flags Any flags you want to pass to SDL::Video upon initialization. Defaults to SDL_ANYFORMAT. Flags should be or'ed together if you're passing more than one (flags => FOO|BAR). Shortcut: 'f'. o resizable Set this to a true value to make the window resizable by the user. Default is off. o exit_on_quit Set this to a true value to make the app exit if a SDL_QUIT event is triggered. Shortcut: 'eoq'. METHODS
title() title( $new_title ) title( $window_title, $icon_title ) "SDLx::App::title" takes 0, 1, or 2 arguments. If no parameter is given, it returns the current application window title. If one parameter is passed, both the window title and icon title will be set to its value. If two parameters are passed the window title will be set to the first, and the icon title to the second. delay( $ms ) "SDLx::App::delay" takes 1 argument, and will sleep the application for that many ms. ticks "SDLx::App::ticks" returns the number of ms since the application began. error "SDLx::App::error" returns the last error message set by the SDL. resize( $width, $height ) "SDLx::App::resize" takes a new width and height of the application. Only works if the application was originally created with the resizable option. fullscreen "SDLx::App::fullscreen" toggles the application in and out of fullscreen mode. iconify "SDLx::App::iconify" iconifies the application window. grab_input( $CONSTANT ) "SDLx::App::grab_input" can be used to change the input focus behavior of the application. It takes one argument, which should be one of the following: o SDL_GRAB_QUERY o SDL_GRAB_ON o SDL_GRAB_OFF sync "SDLx::App::sync" encapsulates the various methods of synchronizing the screen with the current video buffer. "SDLx::App::sync" will do a fullscreen update, using the double buffer or OpenGL buffer if applicable. This is preferred to calling flip on the application window. attribute( $attr ) attribute( $attr, $value ) "SDLx::App::attribute" allows one to get and set GL attributes. By passing a value in addition to the attribute selector, the value will be set. "SDL:::App::attribute" always returns the current value of the given attribute, or Carp::confesss on failure. CALLBACKS
"SDLx::App" is a "SDLx::Controller". Use the event, show and handlers to run the app. use SDL; use SDLx::App; use SDL::Event; #Where ever the event call back is processed my $app = SDLx::App->new( width => 200, height => 200); $app->add_event_handler( sub{ return 0 if $_[0]->type == SDL_QUIT; return 1}); $app->add_show_handler( sub{ $app->update() } ); $app->add_move_handler( sub{ #calc your physics here } ); $app->run(); see SDLx::Controller for more details. AUTHORS
See "AUTHORS" in SDL. SEE ALSO
perl SDL::Surface SDL::Event SDL::OpenGL perl v5.14.2 2012-05-28 pods::SDLx::App(3pm)
All times are GMT -4. The time now is 02:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy