ptk/include/ptk.h

90 lines
2.3 KiB
C
Raw Normal View History

#ifndef PTK_PTK_H_
#define PTK_PTK_H_
2024-08-08 14:38:43 +02:00
2024-10-04 00:00:52 +02:00
#include "ptk_color.h"
#include "ptk_list.h"
#include "ptk_vec.h"
2024-08-08 14:38:43 +02:00
#include <stdint.h>
#include <stddef.h>
typedef struct {
uint32_t major;
uint32_t minor;
uint32_t patch;
} PtkVersion;
Squashed commit of the following: commit ef2fdaab863af71f7afcf23b469f4f220c538d8b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:22:09 2024 +0200 improve all vector types by deunionifying them commit e9948256687a767e2e81a5c1aee2fd47942548c2 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:19:56 2024 +0200 use w and h for radii in ellipse intersects commit 2eb53fb8a3045c3f3b5679a278158e6efecb8e98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:47:03 2024 +0200 add PTK_LIST_CLEAR commit a63f65067ded311192358c4aa54f207e307a8e02 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:46:29 2024 +0200 remove semicolon from filled macro commit 4ac6a1bb70833579898034b4e44486ba62d5cfa6 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:31:13 2024 +0200 ... commit 5142127ae0a73a83534561c6b3873b1cfb74ffab Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:50:08 2024 +0200 add clickable to components if encountered commit b1f31b79650ed7cb74715864b1332973382298fc Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:41:52 2024 +0200 stupid fucking switch syntax commit 8ff74e7235c34ed5a85258f568516d61a38dd416 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:40:05 2024 +0200 remove redundant vertex update commit 448e9fed146fa547293a6ce4eb36841a53e26c6f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:10:48 2024 +0200 handle button hitboxes properly commit a4025fa924b50eb1e51676626f30da8c54a1c34a Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:04:11 2024 +0200 add more const on local variables commit c7386ddfbff8e52ad21964c021e3d22b90c1010d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:02:24 2024 +0200 fix rect triangle comments (xd) commit ca212ac65ec903ea448cb1cd8ae62b89b60fe5d3 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:57:33 2024 +0200 spam const over local variables and function parameters commit 43707826d93d1f9a7a25306f76d4d78277bcbff7 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:31:50 2024 +0200 improve rect triangle init readability commit 2b3f4c58c44277b8ee33b8a32449b807e28928f0 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 02:08:18 2024 +0200 set ellipse rect's type to the ellipse's type commit 4872e59e16f1f1db8fc1bd504656c131d0d00be7 Merge: 336aadc 565aa4d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:29:01 2024 +0200 Merge branch 'main' into button commit 336aadc7a01a2bdd9de2555638de92ac7c393b98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:25:13 2024 +0200 whoops forgot about this one commit 29f0d9f56a7439f8f224cc18be73d99b0b73705f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:22:45 2024 +0200 improve component initialization compound literals zero-initialize all omitted fields including children.size, now we don't have to explicitly do that in each function commit 913286e9e70539a01d6ee5c8f1922db0785cb9fc Merge: 425e670 520b0b9 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:18:39 2024 +0200 Merge branch 'main' into button commit 425e6709b4fd07ef958fa83c7e201f6cbd284615 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:16:38 2024 +0200 initialize children size to 0 on childless components commit 70ef0e030fb63aeb9a18e003494d0f56f3e721e8 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:13:39 2024 +0200 fix vertex input attribute description commit 44204b56777fee3fb5d60f9445d52dd61a641c78 Merge: 0788992 f95c47d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:03:26 2024 +0200 Merge branch 'main' into button commit 0788992af425ec90bb0b998e6cfa99b50a938b11 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:45:13 2024 +0200 remove vk_clickable from components commit 7cc71d31771b0dd5b3a29db17693e4b2268a5ff7 Merge: 3020724 b74186b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:44:02 2024 +0200 Merge branch 'main' into button commit 30207243196ea3692565d3414d2bf8884462aed9 Merge: 83c7968 80a8069 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:18:31 2024 +0200 Merge branch 'main' into button commit 83c7968d480a773c62d99d1c170cd2ec38f7b38d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:03:51 2024 +0200 a few component changes before separating them from shapes commit 4b1fdf8e04b3c68aeb977a84730ce3faa3061057 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:52 2024 +0200 rename button to clickable in one more place commit 6aeb2124d94d502e08f857bd2010ec2bc2d55081 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:39 2024 +0200 improve box creation commit af3066ab7bcd555ca355695291f80a591638acff Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:39 2024 +0200 add pointer versions of add and remove all in ptk list commit b95ddb45a02f49cc4e424a284249b56d9babd9ba Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:14 2024 +0200 rename button to clickable commit 50197a6a2158fe6e141ecdbb23a0f7212453956b Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:09:02 2024 +0200 change default component members and add PTK_COMPONENT_DEFINE commit 2b5be4c732242461b5b20e0342f1a305a5f23aa3 Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:07:53 2024 +0200 extract PTK_LIST_STATIC_INIT into PTK_ARRAY commit 276138043dea71d6647e6c8d38b58f6fdb6a94ee Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 22:04:01 2024 +0200 make the example target not remove the binary commit c101379150352dc014e0d3b92347d7cab465ad17 Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 17:16:35 2024 +0200 initial button test
2024-08-13 14:39:11 +02:00
bool ptk_init(const size_t width, const size_t height, const char *title, const PtkVersion application_version);
2024-08-08 14:38:43 +02:00
typedef struct PtkComponent *PtkHandle;
#define PTK_NULL_HANDLE (void *)0
typedef enum {
PTK_COMPONENT_TYPE_BOX = 0,
PTK_COMPONENT_TYPE_TRIANGLE = 1,
PTK_COMPONENT_TYPE_RECT = 2,
PTK_COMPONENT_TYPE_ELLIPSE = 3,
Squashed commit of the following: commit ef2fdaab863af71f7afcf23b469f4f220c538d8b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:22:09 2024 +0200 improve all vector types by deunionifying them commit e9948256687a767e2e81a5c1aee2fd47942548c2 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:19:56 2024 +0200 use w and h for radii in ellipse intersects commit 2eb53fb8a3045c3f3b5679a278158e6efecb8e98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:47:03 2024 +0200 add PTK_LIST_CLEAR commit a63f65067ded311192358c4aa54f207e307a8e02 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:46:29 2024 +0200 remove semicolon from filled macro commit 4ac6a1bb70833579898034b4e44486ba62d5cfa6 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:31:13 2024 +0200 ... commit 5142127ae0a73a83534561c6b3873b1cfb74ffab Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:50:08 2024 +0200 add clickable to components if encountered commit b1f31b79650ed7cb74715864b1332973382298fc Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:41:52 2024 +0200 stupid fucking switch syntax commit 8ff74e7235c34ed5a85258f568516d61a38dd416 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:40:05 2024 +0200 remove redundant vertex update commit 448e9fed146fa547293a6ce4eb36841a53e26c6f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:10:48 2024 +0200 handle button hitboxes properly commit a4025fa924b50eb1e51676626f30da8c54a1c34a Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:04:11 2024 +0200 add more const on local variables commit c7386ddfbff8e52ad21964c021e3d22b90c1010d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:02:24 2024 +0200 fix rect triangle comments (xd) commit ca212ac65ec903ea448cb1cd8ae62b89b60fe5d3 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:57:33 2024 +0200 spam const over local variables and function parameters commit 43707826d93d1f9a7a25306f76d4d78277bcbff7 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:31:50 2024 +0200 improve rect triangle init readability commit 2b3f4c58c44277b8ee33b8a32449b807e28928f0 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 02:08:18 2024 +0200 set ellipse rect's type to the ellipse's type commit 4872e59e16f1f1db8fc1bd504656c131d0d00be7 Merge: 336aadc 565aa4d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:29:01 2024 +0200 Merge branch 'main' into button commit 336aadc7a01a2bdd9de2555638de92ac7c393b98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:25:13 2024 +0200 whoops forgot about this one commit 29f0d9f56a7439f8f224cc18be73d99b0b73705f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:22:45 2024 +0200 improve component initialization compound literals zero-initialize all omitted fields including children.size, now we don't have to explicitly do that in each function commit 913286e9e70539a01d6ee5c8f1922db0785cb9fc Merge: 425e670 520b0b9 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:18:39 2024 +0200 Merge branch 'main' into button commit 425e6709b4fd07ef958fa83c7e201f6cbd284615 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:16:38 2024 +0200 initialize children size to 0 on childless components commit 70ef0e030fb63aeb9a18e003494d0f56f3e721e8 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:13:39 2024 +0200 fix vertex input attribute description commit 44204b56777fee3fb5d60f9445d52dd61a641c78 Merge: 0788992 f95c47d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:03:26 2024 +0200 Merge branch 'main' into button commit 0788992af425ec90bb0b998e6cfa99b50a938b11 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:45:13 2024 +0200 remove vk_clickable from components commit 7cc71d31771b0dd5b3a29db17693e4b2268a5ff7 Merge: 3020724 b74186b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:44:02 2024 +0200 Merge branch 'main' into button commit 30207243196ea3692565d3414d2bf8884462aed9 Merge: 83c7968 80a8069 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:18:31 2024 +0200 Merge branch 'main' into button commit 83c7968d480a773c62d99d1c170cd2ec38f7b38d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:03:51 2024 +0200 a few component changes before separating them from shapes commit 4b1fdf8e04b3c68aeb977a84730ce3faa3061057 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:52 2024 +0200 rename button to clickable in one more place commit 6aeb2124d94d502e08f857bd2010ec2bc2d55081 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:39 2024 +0200 improve box creation commit af3066ab7bcd555ca355695291f80a591638acff Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:39 2024 +0200 add pointer versions of add and remove all in ptk list commit b95ddb45a02f49cc4e424a284249b56d9babd9ba Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:14 2024 +0200 rename button to clickable commit 50197a6a2158fe6e141ecdbb23a0f7212453956b Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:09:02 2024 +0200 change default component members and add PTK_COMPONENT_DEFINE commit 2b5be4c732242461b5b20e0342f1a305a5f23aa3 Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:07:53 2024 +0200 extract PTK_LIST_STATIC_INIT into PTK_ARRAY commit 276138043dea71d6647e6c8d38b58f6fdb6a94ee Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 22:04:01 2024 +0200 make the example target not remove the binary commit c101379150352dc014e0d3b92347d7cab465ad17 Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 17:16:35 2024 +0200 initial button test
2024-08-13 14:39:11 +02:00
PTK_COMPONENT_TYPE_CLICKABLE = 4,
PTK_COMPONENT_TYPE_IMAGE = 5,
2024-08-08 14:38:43 +02:00
} PtkComponentType;
const char *ptk_component_type_to_str(PtkComponentType type);
Squashed commit of the following: commit ef2fdaab863af71f7afcf23b469f4f220c538d8b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:22:09 2024 +0200 improve all vector types by deunionifying them commit e9948256687a767e2e81a5c1aee2fd47942548c2 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:19:56 2024 +0200 use w and h for radii in ellipse intersects commit 2eb53fb8a3045c3f3b5679a278158e6efecb8e98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:47:03 2024 +0200 add PTK_LIST_CLEAR commit a63f65067ded311192358c4aa54f207e307a8e02 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:46:29 2024 +0200 remove semicolon from filled macro commit 4ac6a1bb70833579898034b4e44486ba62d5cfa6 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:31:13 2024 +0200 ... commit 5142127ae0a73a83534561c6b3873b1cfb74ffab Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:50:08 2024 +0200 add clickable to components if encountered commit b1f31b79650ed7cb74715864b1332973382298fc Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:41:52 2024 +0200 stupid fucking switch syntax commit 8ff74e7235c34ed5a85258f568516d61a38dd416 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:40:05 2024 +0200 remove redundant vertex update commit 448e9fed146fa547293a6ce4eb36841a53e26c6f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:10:48 2024 +0200 handle button hitboxes properly commit a4025fa924b50eb1e51676626f30da8c54a1c34a Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:04:11 2024 +0200 add more const on local variables commit c7386ddfbff8e52ad21964c021e3d22b90c1010d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:02:24 2024 +0200 fix rect triangle comments (xd) commit ca212ac65ec903ea448cb1cd8ae62b89b60fe5d3 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:57:33 2024 +0200 spam const over local variables and function parameters commit 43707826d93d1f9a7a25306f76d4d78277bcbff7 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:31:50 2024 +0200 improve rect triangle init readability commit 2b3f4c58c44277b8ee33b8a32449b807e28928f0 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 02:08:18 2024 +0200 set ellipse rect's type to the ellipse's type commit 4872e59e16f1f1db8fc1bd504656c131d0d00be7 Merge: 336aadc 565aa4d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:29:01 2024 +0200 Merge branch 'main' into button commit 336aadc7a01a2bdd9de2555638de92ac7c393b98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:25:13 2024 +0200 whoops forgot about this one commit 29f0d9f56a7439f8f224cc18be73d99b0b73705f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:22:45 2024 +0200 improve component initialization compound literals zero-initialize all omitted fields including children.size, now we don't have to explicitly do that in each function commit 913286e9e70539a01d6ee5c8f1922db0785cb9fc Merge: 425e670 520b0b9 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:18:39 2024 +0200 Merge branch 'main' into button commit 425e6709b4fd07ef958fa83c7e201f6cbd284615 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:16:38 2024 +0200 initialize children size to 0 on childless components commit 70ef0e030fb63aeb9a18e003494d0f56f3e721e8 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:13:39 2024 +0200 fix vertex input attribute description commit 44204b56777fee3fb5d60f9445d52dd61a641c78 Merge: 0788992 f95c47d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:03:26 2024 +0200 Merge branch 'main' into button commit 0788992af425ec90bb0b998e6cfa99b50a938b11 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:45:13 2024 +0200 remove vk_clickable from components commit 7cc71d31771b0dd5b3a29db17693e4b2268a5ff7 Merge: 3020724 b74186b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:44:02 2024 +0200 Merge branch 'main' into button commit 30207243196ea3692565d3414d2bf8884462aed9 Merge: 83c7968 80a8069 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:18:31 2024 +0200 Merge branch 'main' into button commit 83c7968d480a773c62d99d1c170cd2ec38f7b38d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:03:51 2024 +0200 a few component changes before separating them from shapes commit 4b1fdf8e04b3c68aeb977a84730ce3faa3061057 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:52 2024 +0200 rename button to clickable in one more place commit 6aeb2124d94d502e08f857bd2010ec2bc2d55081 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:39 2024 +0200 improve box creation commit af3066ab7bcd555ca355695291f80a591638acff Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:39 2024 +0200 add pointer versions of add and remove all in ptk list commit b95ddb45a02f49cc4e424a284249b56d9babd9ba Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:14 2024 +0200 rename button to clickable commit 50197a6a2158fe6e141ecdbb23a0f7212453956b Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:09:02 2024 +0200 change default component members and add PTK_COMPONENT_DEFINE commit 2b5be4c732242461b5b20e0342f1a305a5f23aa3 Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:07:53 2024 +0200 extract PTK_LIST_STATIC_INIT into PTK_ARRAY commit 276138043dea71d6647e6c8d38b58f6fdb6a94ee Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 22:04:01 2024 +0200 make the example target not remove the binary commit c101379150352dc014e0d3b92347d7cab465ad17 Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 17:16:35 2024 +0200 initial button test
2024-08-13 14:39:11 +02:00
PTK_LIST_DEFINE(PtkHandle);
2024-08-08 14:38:43 +02:00
Squashed commit of the following: commit ef2fdaab863af71f7afcf23b469f4f220c538d8b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:22:09 2024 +0200 improve all vector types by deunionifying them commit e9948256687a767e2e81a5c1aee2fd47942548c2 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:19:56 2024 +0200 use w and h for radii in ellipse intersects commit 2eb53fb8a3045c3f3b5679a278158e6efecb8e98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:47:03 2024 +0200 add PTK_LIST_CLEAR commit a63f65067ded311192358c4aa54f207e307a8e02 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:46:29 2024 +0200 remove semicolon from filled macro commit 4ac6a1bb70833579898034b4e44486ba62d5cfa6 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:31:13 2024 +0200 ... commit 5142127ae0a73a83534561c6b3873b1cfb74ffab Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:50:08 2024 +0200 add clickable to components if encountered commit b1f31b79650ed7cb74715864b1332973382298fc Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:41:52 2024 +0200 stupid fucking switch syntax commit 8ff74e7235c34ed5a85258f568516d61a38dd416 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:40:05 2024 +0200 remove redundant vertex update commit 448e9fed146fa547293a6ce4eb36841a53e26c6f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:10:48 2024 +0200 handle button hitboxes properly commit a4025fa924b50eb1e51676626f30da8c54a1c34a Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:04:11 2024 +0200 add more const on local variables commit c7386ddfbff8e52ad21964c021e3d22b90c1010d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:02:24 2024 +0200 fix rect triangle comments (xd) commit ca212ac65ec903ea448cb1cd8ae62b89b60fe5d3 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:57:33 2024 +0200 spam const over local variables and function parameters commit 43707826d93d1f9a7a25306f76d4d78277bcbff7 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:31:50 2024 +0200 improve rect triangle init readability commit 2b3f4c58c44277b8ee33b8a32449b807e28928f0 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 02:08:18 2024 +0200 set ellipse rect's type to the ellipse's type commit 4872e59e16f1f1db8fc1bd504656c131d0d00be7 Merge: 336aadc 565aa4d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:29:01 2024 +0200 Merge branch 'main' into button commit 336aadc7a01a2bdd9de2555638de92ac7c393b98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:25:13 2024 +0200 whoops forgot about this one commit 29f0d9f56a7439f8f224cc18be73d99b0b73705f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:22:45 2024 +0200 improve component initialization compound literals zero-initialize all omitted fields including children.size, now we don't have to explicitly do that in each function commit 913286e9e70539a01d6ee5c8f1922db0785cb9fc Merge: 425e670 520b0b9 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:18:39 2024 +0200 Merge branch 'main' into button commit 425e6709b4fd07ef958fa83c7e201f6cbd284615 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:16:38 2024 +0200 initialize children size to 0 on childless components commit 70ef0e030fb63aeb9a18e003494d0f56f3e721e8 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:13:39 2024 +0200 fix vertex input attribute description commit 44204b56777fee3fb5d60f9445d52dd61a641c78 Merge: 0788992 f95c47d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:03:26 2024 +0200 Merge branch 'main' into button commit 0788992af425ec90bb0b998e6cfa99b50a938b11 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:45:13 2024 +0200 remove vk_clickable from components commit 7cc71d31771b0dd5b3a29db17693e4b2268a5ff7 Merge: 3020724 b74186b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:44:02 2024 +0200 Merge branch 'main' into button commit 30207243196ea3692565d3414d2bf8884462aed9 Merge: 83c7968 80a8069 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:18:31 2024 +0200 Merge branch 'main' into button commit 83c7968d480a773c62d99d1c170cd2ec38f7b38d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:03:51 2024 +0200 a few component changes before separating them from shapes commit 4b1fdf8e04b3c68aeb977a84730ce3faa3061057 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:52 2024 +0200 rename button to clickable in one more place commit 6aeb2124d94d502e08f857bd2010ec2bc2d55081 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:39 2024 +0200 improve box creation commit af3066ab7bcd555ca355695291f80a591638acff Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:39 2024 +0200 add pointer versions of add and remove all in ptk list commit b95ddb45a02f49cc4e424a284249b56d9babd9ba Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:14 2024 +0200 rename button to clickable commit 50197a6a2158fe6e141ecdbb23a0f7212453956b Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:09:02 2024 +0200 change default component members and add PTK_COMPONENT_DEFINE commit 2b5be4c732242461b5b20e0342f1a305a5f23aa3 Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:07:53 2024 +0200 extract PTK_LIST_STATIC_INIT into PTK_ARRAY commit 276138043dea71d6647e6c8d38b58f6fdb6a94ee Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 22:04:01 2024 +0200 make the example target not remove the binary commit c101379150352dc014e0d3b92347d7cab465ad17 Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 17:16:35 2024 +0200 initial button test
2024-08-13 14:39:11 +02:00
#define PTK_COMPONENT_DEFINE(name, ...) \
typedef struct name {\
uint64_t id;\
Squashed commit of the following: commit ef2fdaab863af71f7afcf23b469f4f220c538d8b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:22:09 2024 +0200 improve all vector types by deunionifying them commit e9948256687a767e2e81a5c1aee2fd47942548c2 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:19:56 2024 +0200 use w and h for radii in ellipse intersects commit 2eb53fb8a3045c3f3b5679a278158e6efecb8e98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:47:03 2024 +0200 add PTK_LIST_CLEAR commit a63f65067ded311192358c4aa54f207e307a8e02 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:46:29 2024 +0200 remove semicolon from filled macro commit 4ac6a1bb70833579898034b4e44486ba62d5cfa6 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:31:13 2024 +0200 ... commit 5142127ae0a73a83534561c6b3873b1cfb74ffab Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:50:08 2024 +0200 add clickable to components if encountered commit b1f31b79650ed7cb74715864b1332973382298fc Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:41:52 2024 +0200 stupid fucking switch syntax commit 8ff74e7235c34ed5a85258f568516d61a38dd416 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:40:05 2024 +0200 remove redundant vertex update commit 448e9fed146fa547293a6ce4eb36841a53e26c6f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:10:48 2024 +0200 handle button hitboxes properly commit a4025fa924b50eb1e51676626f30da8c54a1c34a Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:04:11 2024 +0200 add more const on local variables commit c7386ddfbff8e52ad21964c021e3d22b90c1010d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:02:24 2024 +0200 fix rect triangle comments (xd) commit ca212ac65ec903ea448cb1cd8ae62b89b60fe5d3 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:57:33 2024 +0200 spam const over local variables and function parameters commit 43707826d93d1f9a7a25306f76d4d78277bcbff7 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:31:50 2024 +0200 improve rect triangle init readability commit 2b3f4c58c44277b8ee33b8a32449b807e28928f0 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 02:08:18 2024 +0200 set ellipse rect's type to the ellipse's type commit 4872e59e16f1f1db8fc1bd504656c131d0d00be7 Merge: 336aadc 565aa4d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:29:01 2024 +0200 Merge branch 'main' into button commit 336aadc7a01a2bdd9de2555638de92ac7c393b98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:25:13 2024 +0200 whoops forgot about this one commit 29f0d9f56a7439f8f224cc18be73d99b0b73705f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:22:45 2024 +0200 improve component initialization compound literals zero-initialize all omitted fields including children.size, now we don't have to explicitly do that in each function commit 913286e9e70539a01d6ee5c8f1922db0785cb9fc Merge: 425e670 520b0b9 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:18:39 2024 +0200 Merge branch 'main' into button commit 425e6709b4fd07ef958fa83c7e201f6cbd284615 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:16:38 2024 +0200 initialize children size to 0 on childless components commit 70ef0e030fb63aeb9a18e003494d0f56f3e721e8 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:13:39 2024 +0200 fix vertex input attribute description commit 44204b56777fee3fb5d60f9445d52dd61a641c78 Merge: 0788992 f95c47d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:03:26 2024 +0200 Merge branch 'main' into button commit 0788992af425ec90bb0b998e6cfa99b50a938b11 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:45:13 2024 +0200 remove vk_clickable from components commit 7cc71d31771b0dd5b3a29db17693e4b2268a5ff7 Merge: 3020724 b74186b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:44:02 2024 +0200 Merge branch 'main' into button commit 30207243196ea3692565d3414d2bf8884462aed9 Merge: 83c7968 80a8069 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:18:31 2024 +0200 Merge branch 'main' into button commit 83c7968d480a773c62d99d1c170cd2ec38f7b38d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:03:51 2024 +0200 a few component changes before separating them from shapes commit 4b1fdf8e04b3c68aeb977a84730ce3faa3061057 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:52 2024 +0200 rename button to clickable in one more place commit 6aeb2124d94d502e08f857bd2010ec2bc2d55081 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:39 2024 +0200 improve box creation commit af3066ab7bcd555ca355695291f80a591638acff Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:39 2024 +0200 add pointer versions of add and remove all in ptk list commit b95ddb45a02f49cc4e424a284249b56d9babd9ba Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:14 2024 +0200 rename button to clickable commit 50197a6a2158fe6e141ecdbb23a0f7212453956b Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:09:02 2024 +0200 change default component members and add PTK_COMPONENT_DEFINE commit 2b5be4c732242461b5b20e0342f1a305a5f23aa3 Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:07:53 2024 +0200 extract PTK_LIST_STATIC_INIT into PTK_ARRAY commit 276138043dea71d6647e6c8d38b58f6fdb6a94ee Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 22:04:01 2024 +0200 make the example target not remove the binary commit c101379150352dc014e0d3b92347d7cab465ad17 Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 17:16:35 2024 +0200 initial button test
2024-08-13 14:39:11 +02:00
PtkComponentType type;\
PtkHandle parent;\
PTK_LIST(PtkHandle) children;\
__VA_ARGS__\
} name
2024-08-08 14:38:43 +02:00
Squashed commit of the following: commit ef2fdaab863af71f7afcf23b469f4f220c538d8b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:22:09 2024 +0200 improve all vector types by deunionifying them commit e9948256687a767e2e81a5c1aee2fd47942548c2 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:19:56 2024 +0200 use w and h for radii in ellipse intersects commit 2eb53fb8a3045c3f3b5679a278158e6efecb8e98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:47:03 2024 +0200 add PTK_LIST_CLEAR commit a63f65067ded311192358c4aa54f207e307a8e02 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:46:29 2024 +0200 remove semicolon from filled macro commit 4ac6a1bb70833579898034b4e44486ba62d5cfa6 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:31:13 2024 +0200 ... commit 5142127ae0a73a83534561c6b3873b1cfb74ffab Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:50:08 2024 +0200 add clickable to components if encountered commit b1f31b79650ed7cb74715864b1332973382298fc Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:41:52 2024 +0200 stupid fucking switch syntax commit 8ff74e7235c34ed5a85258f568516d61a38dd416 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:40:05 2024 +0200 remove redundant vertex update commit 448e9fed146fa547293a6ce4eb36841a53e26c6f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:10:48 2024 +0200 handle button hitboxes properly commit a4025fa924b50eb1e51676626f30da8c54a1c34a Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:04:11 2024 +0200 add more const on local variables commit c7386ddfbff8e52ad21964c021e3d22b90c1010d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:02:24 2024 +0200 fix rect triangle comments (xd) commit ca212ac65ec903ea448cb1cd8ae62b89b60fe5d3 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:57:33 2024 +0200 spam const over local variables and function parameters commit 43707826d93d1f9a7a25306f76d4d78277bcbff7 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:31:50 2024 +0200 improve rect triangle init readability commit 2b3f4c58c44277b8ee33b8a32449b807e28928f0 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 02:08:18 2024 +0200 set ellipse rect's type to the ellipse's type commit 4872e59e16f1f1db8fc1bd504656c131d0d00be7 Merge: 336aadc 565aa4d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:29:01 2024 +0200 Merge branch 'main' into button commit 336aadc7a01a2bdd9de2555638de92ac7c393b98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:25:13 2024 +0200 whoops forgot about this one commit 29f0d9f56a7439f8f224cc18be73d99b0b73705f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:22:45 2024 +0200 improve component initialization compound literals zero-initialize all omitted fields including children.size, now we don't have to explicitly do that in each function commit 913286e9e70539a01d6ee5c8f1922db0785cb9fc Merge: 425e670 520b0b9 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:18:39 2024 +0200 Merge branch 'main' into button commit 425e6709b4fd07ef958fa83c7e201f6cbd284615 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:16:38 2024 +0200 initialize children size to 0 on childless components commit 70ef0e030fb63aeb9a18e003494d0f56f3e721e8 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:13:39 2024 +0200 fix vertex input attribute description commit 44204b56777fee3fb5d60f9445d52dd61a641c78 Merge: 0788992 f95c47d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:03:26 2024 +0200 Merge branch 'main' into button commit 0788992af425ec90bb0b998e6cfa99b50a938b11 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:45:13 2024 +0200 remove vk_clickable from components commit 7cc71d31771b0dd5b3a29db17693e4b2268a5ff7 Merge: 3020724 b74186b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:44:02 2024 +0200 Merge branch 'main' into button commit 30207243196ea3692565d3414d2bf8884462aed9 Merge: 83c7968 80a8069 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:18:31 2024 +0200 Merge branch 'main' into button commit 83c7968d480a773c62d99d1c170cd2ec38f7b38d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:03:51 2024 +0200 a few component changes before separating them from shapes commit 4b1fdf8e04b3c68aeb977a84730ce3faa3061057 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:52 2024 +0200 rename button to clickable in one more place commit 6aeb2124d94d502e08f857bd2010ec2bc2d55081 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:39 2024 +0200 improve box creation commit af3066ab7bcd555ca355695291f80a591638acff Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:39 2024 +0200 add pointer versions of add and remove all in ptk list commit b95ddb45a02f49cc4e424a284249b56d9babd9ba Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:14 2024 +0200 rename button to clickable commit 50197a6a2158fe6e141ecdbb23a0f7212453956b Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:09:02 2024 +0200 change default component members and add PTK_COMPONENT_DEFINE commit 2b5be4c732242461b5b20e0342f1a305a5f23aa3 Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:07:53 2024 +0200 extract PTK_LIST_STATIC_INIT into PTK_ARRAY commit 276138043dea71d6647e6c8d38b58f6fdb6a94ee Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 22:04:01 2024 +0200 make the example target not remove the binary commit c101379150352dc014e0d3b92347d7cab465ad17 Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 17:16:35 2024 +0200 initial button test
2024-08-13 14:39:11 +02:00
PTK_COMPONENT_DEFINE(PtkComponent, );
PTK_COMPONENT_DEFINE(PtkTriangle,
PtkPos vertices[3];
2024-08-13 18:59:52 +02:00
PtkRGB color;
Squashed commit of the following: commit ef2fdaab863af71f7afcf23b469f4f220c538d8b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:22:09 2024 +0200 improve all vector types by deunionifying them commit e9948256687a767e2e81a5c1aee2fd47942548c2 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:19:56 2024 +0200 use w and h for radii in ellipse intersects commit 2eb53fb8a3045c3f3b5679a278158e6efecb8e98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:47:03 2024 +0200 add PTK_LIST_CLEAR commit a63f65067ded311192358c4aa54f207e307a8e02 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:46:29 2024 +0200 remove semicolon from filled macro commit 4ac6a1bb70833579898034b4e44486ba62d5cfa6 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:31:13 2024 +0200 ... commit 5142127ae0a73a83534561c6b3873b1cfb74ffab Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:50:08 2024 +0200 add clickable to components if encountered commit b1f31b79650ed7cb74715864b1332973382298fc Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:41:52 2024 +0200 stupid fucking switch syntax commit 8ff74e7235c34ed5a85258f568516d61a38dd416 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:40:05 2024 +0200 remove redundant vertex update commit 448e9fed146fa547293a6ce4eb36841a53e26c6f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:10:48 2024 +0200 handle button hitboxes properly commit a4025fa924b50eb1e51676626f30da8c54a1c34a Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:04:11 2024 +0200 add more const on local variables commit c7386ddfbff8e52ad21964c021e3d22b90c1010d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:02:24 2024 +0200 fix rect triangle comments (xd) commit ca212ac65ec903ea448cb1cd8ae62b89b60fe5d3 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:57:33 2024 +0200 spam const over local variables and function parameters commit 43707826d93d1f9a7a25306f76d4d78277bcbff7 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:31:50 2024 +0200 improve rect triangle init readability commit 2b3f4c58c44277b8ee33b8a32449b807e28928f0 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 02:08:18 2024 +0200 set ellipse rect's type to the ellipse's type commit 4872e59e16f1f1db8fc1bd504656c131d0d00be7 Merge: 336aadc 565aa4d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:29:01 2024 +0200 Merge branch 'main' into button commit 336aadc7a01a2bdd9de2555638de92ac7c393b98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:25:13 2024 +0200 whoops forgot about this one commit 29f0d9f56a7439f8f224cc18be73d99b0b73705f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:22:45 2024 +0200 improve component initialization compound literals zero-initialize all omitted fields including children.size, now we don't have to explicitly do that in each function commit 913286e9e70539a01d6ee5c8f1922db0785cb9fc Merge: 425e670 520b0b9 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:18:39 2024 +0200 Merge branch 'main' into button commit 425e6709b4fd07ef958fa83c7e201f6cbd284615 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:16:38 2024 +0200 initialize children size to 0 on childless components commit 70ef0e030fb63aeb9a18e003494d0f56f3e721e8 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:13:39 2024 +0200 fix vertex input attribute description commit 44204b56777fee3fb5d60f9445d52dd61a641c78 Merge: 0788992 f95c47d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:03:26 2024 +0200 Merge branch 'main' into button commit 0788992af425ec90bb0b998e6cfa99b50a938b11 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:45:13 2024 +0200 remove vk_clickable from components commit 7cc71d31771b0dd5b3a29db17693e4b2268a5ff7 Merge: 3020724 b74186b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:44:02 2024 +0200 Merge branch 'main' into button commit 30207243196ea3692565d3414d2bf8884462aed9 Merge: 83c7968 80a8069 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:18:31 2024 +0200 Merge branch 'main' into button commit 83c7968d480a773c62d99d1c170cd2ec38f7b38d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:03:51 2024 +0200 a few component changes before separating them from shapes commit 4b1fdf8e04b3c68aeb977a84730ce3faa3061057 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:52 2024 +0200 rename button to clickable in one more place commit 6aeb2124d94d502e08f857bd2010ec2bc2d55081 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:39 2024 +0200 improve box creation commit af3066ab7bcd555ca355695291f80a591638acff Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:39 2024 +0200 add pointer versions of add and remove all in ptk list commit b95ddb45a02f49cc4e424a284249b56d9babd9ba Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:14 2024 +0200 rename button to clickable commit 50197a6a2158fe6e141ecdbb23a0f7212453956b Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:09:02 2024 +0200 change default component members and add PTK_COMPONENT_DEFINE commit 2b5be4c732242461b5b20e0342f1a305a5f23aa3 Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:07:53 2024 +0200 extract PTK_LIST_STATIC_INIT into PTK_ARRAY commit 276138043dea71d6647e6c8d38b58f6fdb6a94ee Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 22:04:01 2024 +0200 make the example target not remove the binary commit c101379150352dc014e0d3b92347d7cab465ad17 Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 17:16:35 2024 +0200 initial button test
2024-08-13 14:39:11 +02:00
);
2024-08-08 14:38:43 +02:00
Squashed commit of the following: commit ef2fdaab863af71f7afcf23b469f4f220c538d8b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:22:09 2024 +0200 improve all vector types by deunionifying them commit e9948256687a767e2e81a5c1aee2fd47942548c2 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:19:56 2024 +0200 use w and h for radii in ellipse intersects commit 2eb53fb8a3045c3f3b5679a278158e6efecb8e98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:47:03 2024 +0200 add PTK_LIST_CLEAR commit a63f65067ded311192358c4aa54f207e307a8e02 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:46:29 2024 +0200 remove semicolon from filled macro commit 4ac6a1bb70833579898034b4e44486ba62d5cfa6 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:31:13 2024 +0200 ... commit 5142127ae0a73a83534561c6b3873b1cfb74ffab Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:50:08 2024 +0200 add clickable to components if encountered commit b1f31b79650ed7cb74715864b1332973382298fc Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:41:52 2024 +0200 stupid fucking switch syntax commit 8ff74e7235c34ed5a85258f568516d61a38dd416 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:40:05 2024 +0200 remove redundant vertex update commit 448e9fed146fa547293a6ce4eb36841a53e26c6f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:10:48 2024 +0200 handle button hitboxes properly commit a4025fa924b50eb1e51676626f30da8c54a1c34a Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:04:11 2024 +0200 add more const on local variables commit c7386ddfbff8e52ad21964c021e3d22b90c1010d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:02:24 2024 +0200 fix rect triangle comments (xd) commit ca212ac65ec903ea448cb1cd8ae62b89b60fe5d3 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:57:33 2024 +0200 spam const over local variables and function parameters commit 43707826d93d1f9a7a25306f76d4d78277bcbff7 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:31:50 2024 +0200 improve rect triangle init readability commit 2b3f4c58c44277b8ee33b8a32449b807e28928f0 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 02:08:18 2024 +0200 set ellipse rect's type to the ellipse's type commit 4872e59e16f1f1db8fc1bd504656c131d0d00be7 Merge: 336aadc 565aa4d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:29:01 2024 +0200 Merge branch 'main' into button commit 336aadc7a01a2bdd9de2555638de92ac7c393b98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:25:13 2024 +0200 whoops forgot about this one commit 29f0d9f56a7439f8f224cc18be73d99b0b73705f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:22:45 2024 +0200 improve component initialization compound literals zero-initialize all omitted fields including children.size, now we don't have to explicitly do that in each function commit 913286e9e70539a01d6ee5c8f1922db0785cb9fc Merge: 425e670 520b0b9 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:18:39 2024 +0200 Merge branch 'main' into button commit 425e6709b4fd07ef958fa83c7e201f6cbd284615 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:16:38 2024 +0200 initialize children size to 0 on childless components commit 70ef0e030fb63aeb9a18e003494d0f56f3e721e8 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:13:39 2024 +0200 fix vertex input attribute description commit 44204b56777fee3fb5d60f9445d52dd61a641c78 Merge: 0788992 f95c47d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:03:26 2024 +0200 Merge branch 'main' into button commit 0788992af425ec90bb0b998e6cfa99b50a938b11 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:45:13 2024 +0200 remove vk_clickable from components commit 7cc71d31771b0dd5b3a29db17693e4b2268a5ff7 Merge: 3020724 b74186b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:44:02 2024 +0200 Merge branch 'main' into button commit 30207243196ea3692565d3414d2bf8884462aed9 Merge: 83c7968 80a8069 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:18:31 2024 +0200 Merge branch 'main' into button commit 83c7968d480a773c62d99d1c170cd2ec38f7b38d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:03:51 2024 +0200 a few component changes before separating them from shapes commit 4b1fdf8e04b3c68aeb977a84730ce3faa3061057 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:52 2024 +0200 rename button to clickable in one more place commit 6aeb2124d94d502e08f857bd2010ec2bc2d55081 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:39 2024 +0200 improve box creation commit af3066ab7bcd555ca355695291f80a591638acff Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:39 2024 +0200 add pointer versions of add and remove all in ptk list commit b95ddb45a02f49cc4e424a284249b56d9babd9ba Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:14 2024 +0200 rename button to clickable commit 50197a6a2158fe6e141ecdbb23a0f7212453956b Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:09:02 2024 +0200 change default component members and add PTK_COMPONENT_DEFINE commit 2b5be4c732242461b5b20e0342f1a305a5f23aa3 Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:07:53 2024 +0200 extract PTK_LIST_STATIC_INIT into PTK_ARRAY commit 276138043dea71d6647e6c8d38b58f6fdb6a94ee Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 22:04:01 2024 +0200 make the example target not remove the binary commit c101379150352dc014e0d3b92347d7cab465ad17 Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 17:16:35 2024 +0200 initial button test
2024-08-13 14:39:11 +02:00
PTK_COMPONENT_DEFINE(PtkRect,
PtkPos top_left;
PtkSize size;
2024-08-13 18:59:52 +02:00
PtkRGB color;
Squashed commit of the following: commit ef2fdaab863af71f7afcf23b469f4f220c538d8b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:22:09 2024 +0200 improve all vector types by deunionifying them commit e9948256687a767e2e81a5c1aee2fd47942548c2 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:19:56 2024 +0200 use w and h for radii in ellipse intersects commit 2eb53fb8a3045c3f3b5679a278158e6efecb8e98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:47:03 2024 +0200 add PTK_LIST_CLEAR commit a63f65067ded311192358c4aa54f207e307a8e02 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:46:29 2024 +0200 remove semicolon from filled macro commit 4ac6a1bb70833579898034b4e44486ba62d5cfa6 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:31:13 2024 +0200 ... commit 5142127ae0a73a83534561c6b3873b1cfb74ffab Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:50:08 2024 +0200 add clickable to components if encountered commit b1f31b79650ed7cb74715864b1332973382298fc Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:41:52 2024 +0200 stupid fucking switch syntax commit 8ff74e7235c34ed5a85258f568516d61a38dd416 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:40:05 2024 +0200 remove redundant vertex update commit 448e9fed146fa547293a6ce4eb36841a53e26c6f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:10:48 2024 +0200 handle button hitboxes properly commit a4025fa924b50eb1e51676626f30da8c54a1c34a Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:04:11 2024 +0200 add more const on local variables commit c7386ddfbff8e52ad21964c021e3d22b90c1010d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:02:24 2024 +0200 fix rect triangle comments (xd) commit ca212ac65ec903ea448cb1cd8ae62b89b60fe5d3 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:57:33 2024 +0200 spam const over local variables and function parameters commit 43707826d93d1f9a7a25306f76d4d78277bcbff7 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:31:50 2024 +0200 improve rect triangle init readability commit 2b3f4c58c44277b8ee33b8a32449b807e28928f0 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 02:08:18 2024 +0200 set ellipse rect's type to the ellipse's type commit 4872e59e16f1f1db8fc1bd504656c131d0d00be7 Merge: 336aadc 565aa4d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:29:01 2024 +0200 Merge branch 'main' into button commit 336aadc7a01a2bdd9de2555638de92ac7c393b98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:25:13 2024 +0200 whoops forgot about this one commit 29f0d9f56a7439f8f224cc18be73d99b0b73705f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:22:45 2024 +0200 improve component initialization compound literals zero-initialize all omitted fields including children.size, now we don't have to explicitly do that in each function commit 913286e9e70539a01d6ee5c8f1922db0785cb9fc Merge: 425e670 520b0b9 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:18:39 2024 +0200 Merge branch 'main' into button commit 425e6709b4fd07ef958fa83c7e201f6cbd284615 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:16:38 2024 +0200 initialize children size to 0 on childless components commit 70ef0e030fb63aeb9a18e003494d0f56f3e721e8 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:13:39 2024 +0200 fix vertex input attribute description commit 44204b56777fee3fb5d60f9445d52dd61a641c78 Merge: 0788992 f95c47d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:03:26 2024 +0200 Merge branch 'main' into button commit 0788992af425ec90bb0b998e6cfa99b50a938b11 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:45:13 2024 +0200 remove vk_clickable from components commit 7cc71d31771b0dd5b3a29db17693e4b2268a5ff7 Merge: 3020724 b74186b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:44:02 2024 +0200 Merge branch 'main' into button commit 30207243196ea3692565d3414d2bf8884462aed9 Merge: 83c7968 80a8069 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:18:31 2024 +0200 Merge branch 'main' into button commit 83c7968d480a773c62d99d1c170cd2ec38f7b38d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:03:51 2024 +0200 a few component changes before separating them from shapes commit 4b1fdf8e04b3c68aeb977a84730ce3faa3061057 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:52 2024 +0200 rename button to clickable in one more place commit 6aeb2124d94d502e08f857bd2010ec2bc2d55081 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:39 2024 +0200 improve box creation commit af3066ab7bcd555ca355695291f80a591638acff Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:39 2024 +0200 add pointer versions of add and remove all in ptk list commit b95ddb45a02f49cc4e424a284249b56d9babd9ba Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:14 2024 +0200 rename button to clickable commit 50197a6a2158fe6e141ecdbb23a0f7212453956b Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:09:02 2024 +0200 change default component members and add PTK_COMPONENT_DEFINE commit 2b5be4c732242461b5b20e0342f1a305a5f23aa3 Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:07:53 2024 +0200 extract PTK_LIST_STATIC_INIT into PTK_ARRAY commit 276138043dea71d6647e6c8d38b58f6fdb6a94ee Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 22:04:01 2024 +0200 make the example target not remove the binary commit c101379150352dc014e0d3b92347d7cab465ad17 Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 17:16:35 2024 +0200 initial button test
2024-08-13 14:39:11 +02:00
);
2024-08-08 14:38:43 +02:00
Squashed commit of the following: commit ef2fdaab863af71f7afcf23b469f4f220c538d8b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:22:09 2024 +0200 improve all vector types by deunionifying them commit e9948256687a767e2e81a5c1aee2fd47942548c2 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:19:56 2024 +0200 use w and h for radii in ellipse intersects commit 2eb53fb8a3045c3f3b5679a278158e6efecb8e98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:47:03 2024 +0200 add PTK_LIST_CLEAR commit a63f65067ded311192358c4aa54f207e307a8e02 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:46:29 2024 +0200 remove semicolon from filled macro commit 4ac6a1bb70833579898034b4e44486ba62d5cfa6 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:31:13 2024 +0200 ... commit 5142127ae0a73a83534561c6b3873b1cfb74ffab Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:50:08 2024 +0200 add clickable to components if encountered commit b1f31b79650ed7cb74715864b1332973382298fc Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:41:52 2024 +0200 stupid fucking switch syntax commit 8ff74e7235c34ed5a85258f568516d61a38dd416 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:40:05 2024 +0200 remove redundant vertex update commit 448e9fed146fa547293a6ce4eb36841a53e26c6f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:10:48 2024 +0200 handle button hitboxes properly commit a4025fa924b50eb1e51676626f30da8c54a1c34a Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:04:11 2024 +0200 add more const on local variables commit c7386ddfbff8e52ad21964c021e3d22b90c1010d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:02:24 2024 +0200 fix rect triangle comments (xd) commit ca212ac65ec903ea448cb1cd8ae62b89b60fe5d3 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:57:33 2024 +0200 spam const over local variables and function parameters commit 43707826d93d1f9a7a25306f76d4d78277bcbff7 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:31:50 2024 +0200 improve rect triangle init readability commit 2b3f4c58c44277b8ee33b8a32449b807e28928f0 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 02:08:18 2024 +0200 set ellipse rect's type to the ellipse's type commit 4872e59e16f1f1db8fc1bd504656c131d0d00be7 Merge: 336aadc 565aa4d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:29:01 2024 +0200 Merge branch 'main' into button commit 336aadc7a01a2bdd9de2555638de92ac7c393b98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:25:13 2024 +0200 whoops forgot about this one commit 29f0d9f56a7439f8f224cc18be73d99b0b73705f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:22:45 2024 +0200 improve component initialization compound literals zero-initialize all omitted fields including children.size, now we don't have to explicitly do that in each function commit 913286e9e70539a01d6ee5c8f1922db0785cb9fc Merge: 425e670 520b0b9 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:18:39 2024 +0200 Merge branch 'main' into button commit 425e6709b4fd07ef958fa83c7e201f6cbd284615 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:16:38 2024 +0200 initialize children size to 0 on childless components commit 70ef0e030fb63aeb9a18e003494d0f56f3e721e8 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:13:39 2024 +0200 fix vertex input attribute description commit 44204b56777fee3fb5d60f9445d52dd61a641c78 Merge: 0788992 f95c47d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:03:26 2024 +0200 Merge branch 'main' into button commit 0788992af425ec90bb0b998e6cfa99b50a938b11 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:45:13 2024 +0200 remove vk_clickable from components commit 7cc71d31771b0dd5b3a29db17693e4b2268a5ff7 Merge: 3020724 b74186b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:44:02 2024 +0200 Merge branch 'main' into button commit 30207243196ea3692565d3414d2bf8884462aed9 Merge: 83c7968 80a8069 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:18:31 2024 +0200 Merge branch 'main' into button commit 83c7968d480a773c62d99d1c170cd2ec38f7b38d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:03:51 2024 +0200 a few component changes before separating them from shapes commit 4b1fdf8e04b3c68aeb977a84730ce3faa3061057 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:52 2024 +0200 rename button to clickable in one more place commit 6aeb2124d94d502e08f857bd2010ec2bc2d55081 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:39 2024 +0200 improve box creation commit af3066ab7bcd555ca355695291f80a591638acff Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:39 2024 +0200 add pointer versions of add and remove all in ptk list commit b95ddb45a02f49cc4e424a284249b56d9babd9ba Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:14 2024 +0200 rename button to clickable commit 50197a6a2158fe6e141ecdbb23a0f7212453956b Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:09:02 2024 +0200 change default component members and add PTK_COMPONENT_DEFINE commit 2b5be4c732242461b5b20e0342f1a305a5f23aa3 Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:07:53 2024 +0200 extract PTK_LIST_STATIC_INIT into PTK_ARRAY commit 276138043dea71d6647e6c8d38b58f6fdb6a94ee Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 22:04:01 2024 +0200 make the example target not remove the binary commit c101379150352dc014e0d3b92347d7cab465ad17 Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 17:16:35 2024 +0200 initial button test
2024-08-13 14:39:11 +02:00
PTK_COMPONENT_DEFINE(PtkEllipse,
PtkPos center;
PtkSize radii;
2024-08-13 18:59:52 +02:00
PtkRGB color;
Squashed commit of the following: commit ef2fdaab863af71f7afcf23b469f4f220c538d8b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:22:09 2024 +0200 improve all vector types by deunionifying them commit e9948256687a767e2e81a5c1aee2fd47942548c2 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:19:56 2024 +0200 use w and h for radii in ellipse intersects commit 2eb53fb8a3045c3f3b5679a278158e6efecb8e98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:47:03 2024 +0200 add PTK_LIST_CLEAR commit a63f65067ded311192358c4aa54f207e307a8e02 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:46:29 2024 +0200 remove semicolon from filled macro commit 4ac6a1bb70833579898034b4e44486ba62d5cfa6 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:31:13 2024 +0200 ... commit 5142127ae0a73a83534561c6b3873b1cfb74ffab Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:50:08 2024 +0200 add clickable to components if encountered commit b1f31b79650ed7cb74715864b1332973382298fc Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:41:52 2024 +0200 stupid fucking switch syntax commit 8ff74e7235c34ed5a85258f568516d61a38dd416 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:40:05 2024 +0200 remove redundant vertex update commit 448e9fed146fa547293a6ce4eb36841a53e26c6f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:10:48 2024 +0200 handle button hitboxes properly commit a4025fa924b50eb1e51676626f30da8c54a1c34a Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:04:11 2024 +0200 add more const on local variables commit c7386ddfbff8e52ad21964c021e3d22b90c1010d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:02:24 2024 +0200 fix rect triangle comments (xd) commit ca212ac65ec903ea448cb1cd8ae62b89b60fe5d3 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:57:33 2024 +0200 spam const over local variables and function parameters commit 43707826d93d1f9a7a25306f76d4d78277bcbff7 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:31:50 2024 +0200 improve rect triangle init readability commit 2b3f4c58c44277b8ee33b8a32449b807e28928f0 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 02:08:18 2024 +0200 set ellipse rect's type to the ellipse's type commit 4872e59e16f1f1db8fc1bd504656c131d0d00be7 Merge: 336aadc 565aa4d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:29:01 2024 +0200 Merge branch 'main' into button commit 336aadc7a01a2bdd9de2555638de92ac7c393b98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:25:13 2024 +0200 whoops forgot about this one commit 29f0d9f56a7439f8f224cc18be73d99b0b73705f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:22:45 2024 +0200 improve component initialization compound literals zero-initialize all omitted fields including children.size, now we don't have to explicitly do that in each function commit 913286e9e70539a01d6ee5c8f1922db0785cb9fc Merge: 425e670 520b0b9 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:18:39 2024 +0200 Merge branch 'main' into button commit 425e6709b4fd07ef958fa83c7e201f6cbd284615 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:16:38 2024 +0200 initialize children size to 0 on childless components commit 70ef0e030fb63aeb9a18e003494d0f56f3e721e8 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:13:39 2024 +0200 fix vertex input attribute description commit 44204b56777fee3fb5d60f9445d52dd61a641c78 Merge: 0788992 f95c47d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:03:26 2024 +0200 Merge branch 'main' into button commit 0788992af425ec90bb0b998e6cfa99b50a938b11 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:45:13 2024 +0200 remove vk_clickable from components commit 7cc71d31771b0dd5b3a29db17693e4b2268a5ff7 Merge: 3020724 b74186b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:44:02 2024 +0200 Merge branch 'main' into button commit 30207243196ea3692565d3414d2bf8884462aed9 Merge: 83c7968 80a8069 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:18:31 2024 +0200 Merge branch 'main' into button commit 83c7968d480a773c62d99d1c170cd2ec38f7b38d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:03:51 2024 +0200 a few component changes before separating them from shapes commit 4b1fdf8e04b3c68aeb977a84730ce3faa3061057 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:52 2024 +0200 rename button to clickable in one more place commit 6aeb2124d94d502e08f857bd2010ec2bc2d55081 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:39 2024 +0200 improve box creation commit af3066ab7bcd555ca355695291f80a591638acff Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:39 2024 +0200 add pointer versions of add and remove all in ptk list commit b95ddb45a02f49cc4e424a284249b56d9babd9ba Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:14 2024 +0200 rename button to clickable commit 50197a6a2158fe6e141ecdbb23a0f7212453956b Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:09:02 2024 +0200 change default component members and add PTK_COMPONENT_DEFINE commit 2b5be4c732242461b5b20e0342f1a305a5f23aa3 Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:07:53 2024 +0200 extract PTK_LIST_STATIC_INIT into PTK_ARRAY commit 276138043dea71d6647e6c8d38b58f6fdb6a94ee Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 22:04:01 2024 +0200 make the example target not remove the binary commit c101379150352dc014e0d3b92347d7cab465ad17 Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 17:16:35 2024 +0200 initial button test
2024-08-13 14:39:11 +02:00
);
2024-09-04 19:42:59 +02:00
typedef struct PtkClickable PtkClickable;
typedef void (*MouseButtonCallback)(PtkClickable *self, const int button, const int mods);
Squashed commit of the following: commit ef2fdaab863af71f7afcf23b469f4f220c538d8b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:22:09 2024 +0200 improve all vector types by deunionifying them commit e9948256687a767e2e81a5c1aee2fd47942548c2 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:19:56 2024 +0200 use w and h for radii in ellipse intersects commit 2eb53fb8a3045c3f3b5679a278158e6efecb8e98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:47:03 2024 +0200 add PTK_LIST_CLEAR commit a63f65067ded311192358c4aa54f207e307a8e02 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:46:29 2024 +0200 remove semicolon from filled macro commit 4ac6a1bb70833579898034b4e44486ba62d5cfa6 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:31:13 2024 +0200 ... commit 5142127ae0a73a83534561c6b3873b1cfb74ffab Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:50:08 2024 +0200 add clickable to components if encountered commit b1f31b79650ed7cb74715864b1332973382298fc Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:41:52 2024 +0200 stupid fucking switch syntax commit 8ff74e7235c34ed5a85258f568516d61a38dd416 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:40:05 2024 +0200 remove redundant vertex update commit 448e9fed146fa547293a6ce4eb36841a53e26c6f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:10:48 2024 +0200 handle button hitboxes properly commit a4025fa924b50eb1e51676626f30da8c54a1c34a Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:04:11 2024 +0200 add more const on local variables commit c7386ddfbff8e52ad21964c021e3d22b90c1010d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:02:24 2024 +0200 fix rect triangle comments (xd) commit ca212ac65ec903ea448cb1cd8ae62b89b60fe5d3 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:57:33 2024 +0200 spam const over local variables and function parameters commit 43707826d93d1f9a7a25306f76d4d78277bcbff7 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:31:50 2024 +0200 improve rect triangle init readability commit 2b3f4c58c44277b8ee33b8a32449b807e28928f0 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 02:08:18 2024 +0200 set ellipse rect's type to the ellipse's type commit 4872e59e16f1f1db8fc1bd504656c131d0d00be7 Merge: 336aadc 565aa4d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:29:01 2024 +0200 Merge branch 'main' into button commit 336aadc7a01a2bdd9de2555638de92ac7c393b98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:25:13 2024 +0200 whoops forgot about this one commit 29f0d9f56a7439f8f224cc18be73d99b0b73705f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:22:45 2024 +0200 improve component initialization compound literals zero-initialize all omitted fields including children.size, now we don't have to explicitly do that in each function commit 913286e9e70539a01d6ee5c8f1922db0785cb9fc Merge: 425e670 520b0b9 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:18:39 2024 +0200 Merge branch 'main' into button commit 425e6709b4fd07ef958fa83c7e201f6cbd284615 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:16:38 2024 +0200 initialize children size to 0 on childless components commit 70ef0e030fb63aeb9a18e003494d0f56f3e721e8 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:13:39 2024 +0200 fix vertex input attribute description commit 44204b56777fee3fb5d60f9445d52dd61a641c78 Merge: 0788992 f95c47d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:03:26 2024 +0200 Merge branch 'main' into button commit 0788992af425ec90bb0b998e6cfa99b50a938b11 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:45:13 2024 +0200 remove vk_clickable from components commit 7cc71d31771b0dd5b3a29db17693e4b2268a5ff7 Merge: 3020724 b74186b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:44:02 2024 +0200 Merge branch 'main' into button commit 30207243196ea3692565d3414d2bf8884462aed9 Merge: 83c7968 80a8069 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:18:31 2024 +0200 Merge branch 'main' into button commit 83c7968d480a773c62d99d1c170cd2ec38f7b38d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:03:51 2024 +0200 a few component changes before separating them from shapes commit 4b1fdf8e04b3c68aeb977a84730ce3faa3061057 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:52 2024 +0200 rename button to clickable in one more place commit 6aeb2124d94d502e08f857bd2010ec2bc2d55081 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:39 2024 +0200 improve box creation commit af3066ab7bcd555ca355695291f80a591638acff Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:39 2024 +0200 add pointer versions of add and remove all in ptk list commit b95ddb45a02f49cc4e424a284249b56d9babd9ba Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:14 2024 +0200 rename button to clickable commit 50197a6a2158fe6e141ecdbb23a0f7212453956b Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:09:02 2024 +0200 change default component members and add PTK_COMPONENT_DEFINE commit 2b5be4c732242461b5b20e0342f1a305a5f23aa3 Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:07:53 2024 +0200 extract PTK_LIST_STATIC_INIT into PTK_ARRAY commit 276138043dea71d6647e6c8d38b58f6fdb6a94ee Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 22:04:01 2024 +0200 make the example target not remove the binary commit c101379150352dc014e0d3b92347d7cab465ad17 Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 17:16:35 2024 +0200 initial button test
2024-08-13 14:39:11 +02:00
PTK_COMPONENT_DEFINE(PtkClickable,
MouseButtonCallback on_press;
);
PTK_COMPONENT_DEFINE(PtkImage,
const char *path;
PtkPos top_left;
PtkSize size;
);
Squashed commit of the following: commit ef2fdaab863af71f7afcf23b469f4f220c538d8b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:22:09 2024 +0200 improve all vector types by deunionifying them commit e9948256687a767e2e81a5c1aee2fd47942548c2 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:19:56 2024 +0200 use w and h for radii in ellipse intersects commit 2eb53fb8a3045c3f3b5679a278158e6efecb8e98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:47:03 2024 +0200 add PTK_LIST_CLEAR commit a63f65067ded311192358c4aa54f207e307a8e02 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:46:29 2024 +0200 remove semicolon from filled macro commit 4ac6a1bb70833579898034b4e44486ba62d5cfa6 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:31:13 2024 +0200 ... commit 5142127ae0a73a83534561c6b3873b1cfb74ffab Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:50:08 2024 +0200 add clickable to components if encountered commit b1f31b79650ed7cb74715864b1332973382298fc Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:41:52 2024 +0200 stupid fucking switch syntax commit 8ff74e7235c34ed5a85258f568516d61a38dd416 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:40:05 2024 +0200 remove redundant vertex update commit 448e9fed146fa547293a6ce4eb36841a53e26c6f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:10:48 2024 +0200 handle button hitboxes properly commit a4025fa924b50eb1e51676626f30da8c54a1c34a Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:04:11 2024 +0200 add more const on local variables commit c7386ddfbff8e52ad21964c021e3d22b90c1010d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:02:24 2024 +0200 fix rect triangle comments (xd) commit ca212ac65ec903ea448cb1cd8ae62b89b60fe5d3 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:57:33 2024 +0200 spam const over local variables and function parameters commit 43707826d93d1f9a7a25306f76d4d78277bcbff7 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:31:50 2024 +0200 improve rect triangle init readability commit 2b3f4c58c44277b8ee33b8a32449b807e28928f0 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 02:08:18 2024 +0200 set ellipse rect's type to the ellipse's type commit 4872e59e16f1f1db8fc1bd504656c131d0d00be7 Merge: 336aadc 565aa4d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:29:01 2024 +0200 Merge branch 'main' into button commit 336aadc7a01a2bdd9de2555638de92ac7c393b98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:25:13 2024 +0200 whoops forgot about this one commit 29f0d9f56a7439f8f224cc18be73d99b0b73705f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:22:45 2024 +0200 improve component initialization compound literals zero-initialize all omitted fields including children.size, now we don't have to explicitly do that in each function commit 913286e9e70539a01d6ee5c8f1922db0785cb9fc Merge: 425e670 520b0b9 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:18:39 2024 +0200 Merge branch 'main' into button commit 425e6709b4fd07ef958fa83c7e201f6cbd284615 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:16:38 2024 +0200 initialize children size to 0 on childless components commit 70ef0e030fb63aeb9a18e003494d0f56f3e721e8 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:13:39 2024 +0200 fix vertex input attribute description commit 44204b56777fee3fb5d60f9445d52dd61a641c78 Merge: 0788992 f95c47d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:03:26 2024 +0200 Merge branch 'main' into button commit 0788992af425ec90bb0b998e6cfa99b50a938b11 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:45:13 2024 +0200 remove vk_clickable from components commit 7cc71d31771b0dd5b3a29db17693e4b2268a5ff7 Merge: 3020724 b74186b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:44:02 2024 +0200 Merge branch 'main' into button commit 30207243196ea3692565d3414d2bf8884462aed9 Merge: 83c7968 80a8069 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:18:31 2024 +0200 Merge branch 'main' into button commit 83c7968d480a773c62d99d1c170cd2ec38f7b38d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:03:51 2024 +0200 a few component changes before separating them from shapes commit 4b1fdf8e04b3c68aeb977a84730ce3faa3061057 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:52 2024 +0200 rename button to clickable in one more place commit 6aeb2124d94d502e08f857bd2010ec2bc2d55081 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:39 2024 +0200 improve box creation commit af3066ab7bcd555ca355695291f80a591638acff Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:39 2024 +0200 add pointer versions of add and remove all in ptk list commit b95ddb45a02f49cc4e424a284249b56d9babd9ba Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:14 2024 +0200 rename button to clickable commit 50197a6a2158fe6e141ecdbb23a0f7212453956b Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:09:02 2024 +0200 change default component members and add PTK_COMPONENT_DEFINE commit 2b5be4c732242461b5b20e0342f1a305a5f23aa3 Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:07:53 2024 +0200 extract PTK_LIST_STATIC_INIT into PTK_ARRAY commit 276138043dea71d6647e6c8d38b58f6fdb6a94ee Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 22:04:01 2024 +0200 make the example target not remove the binary commit c101379150352dc014e0d3b92347d7cab465ad17 Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 17:16:35 2024 +0200 initial button test
2024-08-13 14:39:11 +02:00
PtkHandle ptk_box(const size_t child_count, PtkHandle *children);
2024-08-13 18:59:52 +02:00
PtkHandle ptk_triangle(const PtkPos vertices[3], const PtkRGB color);
PtkHandle ptk_rect(const PtkPos top_left, const PtkSize size, const PtkRGB color);
PtkHandle ptk_square(const PtkPos top_left, const float size, const PtkRGB color);
PtkHandle ptk_ellipse(const PtkPos center, const PtkSize radii, const PtkRGB color);
PtkHandle ptk_circle(const PtkPos center, const float radius, const PtkRGB color);
Squashed commit of the following: commit ef2fdaab863af71f7afcf23b469f4f220c538d8b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:22:09 2024 +0200 improve all vector types by deunionifying them commit e9948256687a767e2e81a5c1aee2fd47942548c2 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 14:19:56 2024 +0200 use w and h for radii in ellipse intersects commit 2eb53fb8a3045c3f3b5679a278158e6efecb8e98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:47:03 2024 +0200 add PTK_LIST_CLEAR commit a63f65067ded311192358c4aa54f207e307a8e02 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:46:29 2024 +0200 remove semicolon from filled macro commit 4ac6a1bb70833579898034b4e44486ba62d5cfa6 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 13:31:13 2024 +0200 ... commit 5142127ae0a73a83534561c6b3873b1cfb74ffab Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:50:08 2024 +0200 add clickable to components if encountered commit b1f31b79650ed7cb74715864b1332973382298fc Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:41:52 2024 +0200 stupid fucking switch syntax commit 8ff74e7235c34ed5a85258f568516d61a38dd416 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:40:05 2024 +0200 remove redundant vertex update commit 448e9fed146fa547293a6ce4eb36841a53e26c6f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:10:48 2024 +0200 handle button hitboxes properly commit a4025fa924b50eb1e51676626f30da8c54a1c34a Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:04:11 2024 +0200 add more const on local variables commit c7386ddfbff8e52ad21964c021e3d22b90c1010d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 12:02:24 2024 +0200 fix rect triangle comments (xd) commit ca212ac65ec903ea448cb1cd8ae62b89b60fe5d3 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:57:33 2024 +0200 spam const over local variables and function parameters commit 43707826d93d1f9a7a25306f76d4d78277bcbff7 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 11:31:50 2024 +0200 improve rect triangle init readability commit 2b3f4c58c44277b8ee33b8a32449b807e28928f0 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 02:08:18 2024 +0200 set ellipse rect's type to the ellipse's type commit 4872e59e16f1f1db8fc1bd504656c131d0d00be7 Merge: 336aadc 565aa4d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:29:01 2024 +0200 Merge branch 'main' into button commit 336aadc7a01a2bdd9de2555638de92ac7c393b98 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:25:13 2024 +0200 whoops forgot about this one commit 29f0d9f56a7439f8f224cc18be73d99b0b73705f Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:22:45 2024 +0200 improve component initialization compound literals zero-initialize all omitted fields including children.size, now we don't have to explicitly do that in each function commit 913286e9e70539a01d6ee5c8f1922db0785cb9fc Merge: 425e670 520b0b9 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:18:39 2024 +0200 Merge branch 'main' into button commit 425e6709b4fd07ef958fa83c7e201f6cbd284615 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:16:38 2024 +0200 initialize children size to 0 on childless components commit 70ef0e030fb63aeb9a18e003494d0f56f3e721e8 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:13:39 2024 +0200 fix vertex input attribute description commit 44204b56777fee3fb5d60f9445d52dd61a641c78 Merge: 0788992 f95c47d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 01:03:26 2024 +0200 Merge branch 'main' into button commit 0788992af425ec90bb0b998e6cfa99b50a938b11 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:45:13 2024 +0200 remove vk_clickable from components commit 7cc71d31771b0dd5b3a29db17693e4b2268a5ff7 Merge: 3020724 b74186b Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:44:02 2024 +0200 Merge branch 'main' into button commit 30207243196ea3692565d3414d2bf8884462aed9 Merge: 83c7968 80a8069 Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:18:31 2024 +0200 Merge branch 'main' into button commit 83c7968d480a773c62d99d1c170cd2ec38f7b38d Author: jacekpoz <jacekpoz@proton.me> Date: Tue Aug 13 00:03:51 2024 +0200 a few component changes before separating them from shapes commit 4b1fdf8e04b3c68aeb977a84730ce3faa3061057 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:52 2024 +0200 rename button to clickable in one more place commit 6aeb2124d94d502e08f857bd2010ec2bc2d55081 Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:49:39 2024 +0200 improve box creation commit af3066ab7bcd555ca355695291f80a591638acff Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:39 2024 +0200 add pointer versions of add and remove all in ptk list commit b95ddb45a02f49cc4e424a284249b56d9babd9ba Author: jacekpoz <jacekpoz@proton.me> Date: Mon Aug 12 23:48:14 2024 +0200 rename button to clickable commit 50197a6a2158fe6e141ecdbb23a0f7212453956b Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:09:02 2024 +0200 change default component members and add PTK_COMPONENT_DEFINE commit 2b5be4c732242461b5b20e0342f1a305a5f23aa3 Author: jacekpoz <jacekpoz@proton.me> Date: Sun Aug 11 21:07:53 2024 +0200 extract PTK_LIST_STATIC_INIT into PTK_ARRAY commit 276138043dea71d6647e6c8d38b58f6fdb6a94ee Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 22:04:01 2024 +0200 make the example target not remove the binary commit c101379150352dc014e0d3b92347d7cab465ad17 Author: jacekpoz <jacekpoz@proton.me> Date: Fri Aug 9 17:16:35 2024 +0200 initial button test
2024-08-13 14:39:11 +02:00
PtkHandle ptk_clickable(PtkHandle hitbox, const MouseButtonCallback on_press);
PtkHandle ptk_image(const char *path, const PtkPos top_left, const PtkSize size);
2024-08-08 14:38:43 +02:00
#define PTK_BOX(...) ptk_box(sizeof((PtkHandle []){ __VA_ARGS__ }) / sizeof(PtkHandle), (PtkHandle []) { __VA_ARGS__ })
int ptk_run(PtkHandle root);
#endif // PTK_PTK_H_