English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 14 October 2018, 12:21   #1
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
C Intuition Help

I'm looking to try and create basic Intuition application on its own screen and draw some labels. I've gone through some examples i've found and created a screen and a window (presumably i cant stick things directly on the screen?) What i'd like to be able to do now is:- 1. Draw labels on that window with various fonts.2. If possible make the window "headless".. unsure of the amiga term but no title bar or buttons.. just overlayed on the screen. Very familiar with C and Amiga just dont know Intuition at all.

Last edited by SpeedGeek; 16 February 2021 at 11:51. Reason: Restore deleted post
plasmab is offline  
Old 14 October 2018, 17:07   #2
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,335
I think you can render directly to the Screen (i.e. not need to open a window) if you want. Pass a pointer to the RastPort field of the Screen structure to various graphics.library routines like Text(), Move(), Draw() etc.

You can also open a borderless backdrop window to cover the whole screen if you need to use Intuition stuff like gadgets etc. Specify the WFLG_BACKDROP and WFLG_BORDERLESS flags in the Flags field or your NewWindow structure.
mark_k is offline  
Old 14 October 2018, 17:15   #3
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Thanks. Will give it a whirl and report back .
plasmab is offline  
Old 14 October 2018, 19:41   #4
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
You can indeed draw directly to the screen, but be aware there will be no clipping. If you draw past the right edge of the screen, it will appear on the left and vice versa. While this might still be funny, it's dangerous to draw beyond the top or bottom border because you will hit memory you don't own.

Also you won't receive any user input. With only a screen you can only wait a while and then close it. If you want to react on user input you need a window.

Maybe you like the attached example. It opens a screen and a window and display mouse coordinated when the mouse is moved with a font loaded from disk.
Attached Files
File Type: c scrmouse.c (3.7 KB, 136 views)
thomas is online now  
Old 14 October 2018, 19:43   #5
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 652
Also look into the SA_Quiet and SCREENQUIET tag/flag when opening the screen.
pipper is offline  
Old 14 October 2018, 23:38   #6
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Thanks all. I compiled that C up but it didnt work, no output and stopped. But i got the gist of what it was doing.
plasmab is offline  
Old 15 October 2018, 09:01   #7
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
Then you did something wrong becasue it does work. I wouldn't publish a demo without having it tested.
thomas is online now  
Old 15 October 2018, 09:05   #8
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
C Intuition Help

Compiled ok. Just silently didn’t do anything. I did notice it’s requesting more bitplanes than a standard Amiga has. I dropped that to 3 but same behaviour. I’ll dig in later.

EDiT: I did notice there are no braces around the else clauses which sets my code OCD off big time.... seen so many bugs caused by that over the years.

Last edited by plasmab; 15 October 2018 at 09:20.
plasmab is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
1.x Intuition knob gadget arcanist Coders. System 0 30 January 2018 17:49
intuition.library zharn Coders. System 8 22 February 2015 12:50
Intuition Prefs daemon problem: Mogsy support.Hardware 4 09 November 2012 20:14
Intuition - Menus Gilloo Coders. System 1 05 March 2012 10:11
Intuition window WinAPI integration? Mequa support.WinUAE 10 12 November 2010 21:46

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:46.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.18529 seconds with 16 queries