Welcome, Guest. Please login or register.

Author Topic: Amiga C - GUI Question  (Read 1383 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline KernelTopic starter

  • Sr. Member
  • ****
  • Join Date: Feb 2006
  • Posts: 292
    • Show only replies by Kernel
Amiga C - GUI Question
« on: February 02, 2017, 06:17:00 PM »
I have a very noob question as far as Amiga C programming goes so my apologies ahead of time...

I have the source to an old program want to play with.  The workbench window mode of it appears corrupted under 3.1 in the sense that the size is not standard and it's not picking up Birdie or VisualPrefs settings like other windows do.

Question is, would a simple compile using the 3.9 dev kit correct this or is this possibly some custom code that defined window border sizes etc. custom to the program?

I'm not looking for a real in depth answer, just more of a "yep, a recompile should fix that" or a "nope, this stuff is typically defined in code so dig in!", though I don't mind if it blows up into more of a discussion.

Thanks.
 

Offline Thomas

Re: Amiga C - GUI Question
« Reply #1 on: February 02, 2017, 08:55:31 PM »
A recompile won't fix it. Window programming hasn't changed much since OS 1.x. There is no way for a program to influence window border drawing. Therefore it is also impossible for a program to partially disable VisualPrefs and/or Birdie.

Most likely the program opens a borderless window and does all drawing by itself. This is very untypical and as a beginner you probably won't be able to "fix" it. (There is nothing to fix, the developer intended to let the window look like that. You would have to rewrite all the code.)

Offline Pat the Cat

Re: Amiga C - GUI Question
« Reply #2 on: February 02, 2017, 11:22:08 PM »
It is kind of a first step when writing software - do I want GUI interface windows, or am I going to do all that myself?

It was a big thing to turn off the OS and do all the work yourself. If the OS was going to be a hindrance for what you were trying to program, you turned it off, either right at the beginning, or selectively in the main body of code for events that needed a little privacy and complete control of resources. The snag with the latter method, you got a glitch when handing back control and telling the GUI to clear the screen and redraw everything (this is observable behaviour with some software).
"To recurse is human. To iterate, divine."

A1200, Vanilla, Surf Squirrel, SD Card, KS 3.0/3.z, PCMCIA dev
A500, Vanilla, A570, Rev 5, KS 1.2/1.3 Testbench system
Rasp Pi, UAE4ARM, 3D laser scanner, experimental, hoping for AmigaOS4Arm, based on Watterott Fabscan Pi
 

Offline darkage

  • Hero Member
  • *****
  • Join Date: Aug 2007
  • Posts: 583
    • Show only replies by darkage
Re: Amiga C - GUI Question
« Reply #3 on: February 02, 2017, 11:46:06 PM »
Probably good to check the intuition reference manual just for good reading and to have a better understanding.

http://www.bombjack.org/amiga/amiga-books.htm
« Last Edit: February 02, 2017, 11:57:37 PM by darkage »
 

Offline Minuous

Re: Amiga C - GUI Question
« Reply #4 on: February 03, 2017, 11:06:44 AM »
@Pat the Cat:

They are talking about leaving the OS turned on and just doing custom drawing of titlebars, etc.
 

guest11527

  • Guest
Re: Amiga C - GUI Question
« Reply #5 on: February 03, 2017, 06:16:43 PM »
Recompilation will not fix this problem - the origional author screwed it up. It is not rocket science to write programs that work both under 1.3 and 3.1, especially intuition has a quite good and usable interface.  A good start for writing intuition programs are the RKRMs (Rom Kernel Reference Manuals), for intuition especially the "Libraries" volume which describes the functions for opening, closing and manipulating windows.   There is also some third-party literature which provides more examples. Unfortunately, the books I looked into are in German, so probably not appropriate here.
 

Offline KernelTopic starter

  • Sr. Member
  • ****
  • Join Date: Feb 2006
  • Posts: 292
    • Show only replies by Kernel
Re: Amiga C - GUI Question
« Reply #6 on: February 03, 2017, 06:56:45 PM »
Quote from: Minuous;821439
@Pat the Cat:

They are talking about leaving the OS turned on and just doing custom drawing of titlebars, etc.


Yes I believe this is what I'm looking at... it's an old BBS program I used many years ago and thought it would be a good place to play around since it's freeware.  It can either open on its own screen or in a WB Window, it just that like I said on 3.1 it doesn't appear to be style compliant and I'd like to take a shot at changing that first.

Thanks all!
 

Offline Pat the Cat

Re: Amiga C - GUI Question
« Reply #7 on: February 04, 2017, 12:20:01 AM »
If the software is pre WB2, it is probably using the arp.library often used just for a file requester window.

This was bundled with the OS 2 and above, but was a separate library on 1.3.
"To recurse is human. To iterate, divine."

A1200, Vanilla, Surf Squirrel, SD Card, KS 3.0/3.z, PCMCIA dev
A500, Vanilla, A570, Rev 5, KS 1.2/1.3 Testbench system
Rasp Pi, UAE4ARM, 3D laser scanner, experimental, hoping for AmigaOS4Arm, based on Watterott Fabscan Pi