vapaamies / KolibriOS

Delphi SDK для KolibriOS
https://kolibrios.cantor.systems
BSD 2-Clause "Simplified" License
24 stars 5 forks source link

Add some helpers and indirect functions #2

Closed amber8706 closed 4 years ago

amber8706 commented 4 years ago

Add types long: TSizeLong, TPointLong. Changet types: TRect, TBox

Wrappers: DrawWindowIndirect, DrawButtonIndirect New types for wrappers: TRGBColor, LOGWINDOW, LOGBUTTON

And some helpers functions

vapaamies commented 4 years ago

Only Borland/Embarcadero styled sources are acceptable.

Mazdaywik commented 4 years ago

@vapaamies, на GitHub замечания принято оставлять через ревью. Для этого нужно зайти на вкладку «Files changed», нажать на «Review changes↓» и выбрать переключатель «Request changes».

Mazdaywik commented 4 years ago

@amber8706, для выделения имён типов в тексте pull request’а их нужно окружать знаками обратной кавычки (на букве «ё»):

Add types long: `TSizeLong`, `TPointLong`.
Changet types: `TRect`, `TBox`.

даст:

Add types long: TSizeLong, TPointLong. Changet types: TRect, TBox.

amber8706 commented 4 years ago

Only Borland/Embarcadero styled sources are acceptable.

3.7 Type Declarations All type declarations should begin with the letter T, and should follow the same capitalization specification laid out in the beginning of this section, or in the section on class declarations.

Types: KolibriChar, PKolibriChar, PPKolibriChar - without T

Declaration of procedures, in the style:

{-1} procedure TerminateThread; stdcall

Does not comply with paragraph 4.3 You should ALWAYS indent TWO spaces for ALL indentation levels.... (There are few exceptions. The reserved words unit, users, type, interface, implementation, initialization and finalization)

NOTE: In Delphi, it is common to write Assembly code using capital letters (code examples in the System and SysUtils modules)

4.4 Continuation Lines Lines should be limited to 80 columns. Lines longer than 80 columns should be broken into one or more continuation lines, as needed. For exsample:

procedure DrawWindow(Left, Top, Right, Bottom: LongInt; Caption: PKolibriChar; BackColor, Style, CapStyle: LongWord); stdcall;

5.2 Single-Line Comments A single-line comment consists of the characters // followed by text.

INCORRECT: {-1} procedure TerminateThread; stdcall;

CORRECT: //-1
procedure TerminateThread; stdcall;

Дальше лень писать... Соблюдайте сами те правила, в которые тыкаете других! И да, если вам что-то не нравится - укажите место в коде, а не ссылку на правила!

P.S. Что GitHub сделал с текстом? Почему некоторые его куски, он выделил жирным?

vapaamies commented 4 years ago

As I wrote on the forum, helper functions should be placed in KolibriHelpers unit. Only RGB color function is really useful.