This commit is contained in:
parent
2dd2ae3f85
commit
bcc4766e5f
5 changed files with 22 additions and 18 deletions
|
|
@ -264,8 +264,8 @@ void vulkan_setup(MwWidget handle) {
|
||||||
swapchainCreateInfo.imageExtent = (VkExtent2D){.width = ow, .height = oh},
|
swapchainCreateInfo.imageExtent = (VkExtent2D){.width = ow, .height = oh},
|
||||||
swapchainCreateInfo.imageArrayLayers = 1,
|
swapchainCreateInfo.imageArrayLayers = 1,
|
||||||
swapchainCreateInfo.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
|
swapchainCreateInfo.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
|
||||||
VK_IMAGE_USAGE_TRANSFER_DST_BIT |
|
VK_IMAGE_USAGE_TRANSFER_DST_BIT |
|
||||||
VK_IMAGE_USAGE_SAMPLED_BIT;
|
VK_IMAGE_USAGE_SAMPLED_BIT;
|
||||||
// th is how we specify no transformation.
|
// th is how we specify no transformation.
|
||||||
swapchainCreateInfo.preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
|
swapchainCreateInfo.preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
|
||||||
swapchainCreateInfo.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
|
swapchainCreateInfo.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
|
||||||
|
|
|
||||||
|
|
@ -703,7 +703,7 @@ void MwLLNextEventImpl(MwLL handle) {
|
||||||
}
|
}
|
||||||
|
|
||||||
MwLLPixmap MwLLCreatePixmapImpl(MwLL handle, unsigned char* data, int width, int height) {
|
MwLLPixmap MwLLCreatePixmapImpl(MwLL handle, unsigned char* data, int width, int height) {
|
||||||
MwLLPixmap r = (MwLLPixmap)malloc(sizeof(*r));
|
MwLLPixmap r = (MwLLPixmap)malloc(sizeof(*r));
|
||||||
|
|
||||||
(void)handle;
|
(void)handle;
|
||||||
|
|
||||||
|
|
@ -803,9 +803,9 @@ void MwLLSetSizeHintsImpl(MwLL handle, int minx, int miny, int maxx, int maxy) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MwLLMakeBorderlessImpl(MwLL handle, int toggle) {
|
void MwLLMakeBorderlessImpl(MwLL handle, int toggle) {
|
||||||
if(toggle){
|
if(toggle) {
|
||||||
handle->haiku.type = B_TITLED_WINDOW;
|
handle->haiku.type = B_TITLED_WINDOW;
|
||||||
}else{
|
} else {
|
||||||
handle->haiku.type = B_UNTYPED_WINDOW;
|
handle->haiku.type = B_UNTYPED_WINDOW;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -420,8 +420,8 @@ static void redrawIfNeeded(MwWidget handle, int row) {
|
||||||
static int mwListBoxSetImpl(MwWidget handle, int row, int col, const char* text) {
|
static int mwListBoxSetImpl(MwWidget handle, int row, int col, const char* text) {
|
||||||
MwListBox lb = handle->internal;
|
MwListBox lb = handle->internal;
|
||||||
MwListBoxEntry entry;
|
MwListBoxEntry entry;
|
||||||
char* t = text == NULL ? NULL : MwStringDuplicate(text);
|
char* t = text == NULL ? NULL : MwStringDuplicate(text);
|
||||||
int new = 0;
|
int new = 0;
|
||||||
if(row == -1) row = arrlen(lb->list);
|
if(row == -1) row = arrlen(lb->list);
|
||||||
|
|
||||||
entry.name = NULL;
|
entry.name = NULL;
|
||||||
|
|
@ -449,7 +449,7 @@ static int mwListBoxSetImpl(MwWidget handle, int row, int col, const char* text)
|
||||||
static void mwListBoxSetIconImpl(MwWidget handle, int index, MwLLPixmap icon) {
|
static void mwListBoxSetIconImpl(MwWidget handle, int index, MwLLPixmap icon) {
|
||||||
MwListBox lb = handle->internal;
|
MwListBox lb = handle->internal;
|
||||||
MwListBoxEntry entry;
|
MwListBoxEntry entry;
|
||||||
int new = 0;
|
int new = 0;
|
||||||
if(index == -1) index = arrlen(lb->list);
|
if(index == -1) index = arrlen(lb->list);
|
||||||
|
|
||||||
entry.name = NULL;
|
entry.name = NULL;
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,9 @@ static void draw(MwWidget handle) {
|
||||||
MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground));
|
MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground));
|
||||||
MwLLColor dark = MwLightenColor(handle, base, -64, -64, -64);
|
MwLLColor dark = MwLightenColor(handle, base, -64, -64, -64);
|
||||||
MwScrollBar scr = handle->internal;
|
MwScrollBar scr = handle->internal;
|
||||||
int or;
|
int or ;
|
||||||
int uy, dy, ux, dx;
|
int uy, dy, ux, dx;
|
||||||
MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap);
|
MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap);
|
||||||
|
|
||||||
r.x = 0;
|
r.x = 0;
|
||||||
r.y = 0;
|
r.y = 0;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
my @cfiles = ();
|
my @cfiles = ();
|
||||||
my @examples = ();
|
my @examples = ();
|
||||||
|
|
||||||
sub scan {
|
sub scan {
|
||||||
|
|
@ -97,7 +97,7 @@ sub generate {
|
||||||
$exeout = "name ";
|
$exeout = "name ";
|
||||||
$def = "-d";
|
$def = "-d";
|
||||||
$inc = "-i=";
|
$inc = "-i=";
|
||||||
$cdll = "-bd";
|
$cdll = "-bd";
|
||||||
$dll = "system nt_dll";
|
$dll = "system nt_dll";
|
||||||
$exe = "system nt";
|
$exe = "system nt";
|
||||||
$lib = "library ";
|
$lib = "library ";
|
||||||
|
|
@ -122,6 +122,7 @@ sub generate {
|
||||||
print(OUT "EXE_CFLAGS = ${inc}include\n");
|
print(OUT "EXE_CFLAGS = ${inc}include\n");
|
||||||
print(OUT "EXE_LDFLAGS = $exe");
|
print(OUT "EXE_LDFLAGS = $exe");
|
||||||
print(OUT "\n");
|
print(OUT "\n");
|
||||||
|
|
||||||
if ($suffix) {
|
if ($suffix) {
|
||||||
print(OUT ".SUFFIXES: .obj .c\n");
|
print(OUT ".SUFFIXES: .obj .c\n");
|
||||||
}
|
}
|
||||||
|
|
@ -172,11 +173,14 @@ sub generate {
|
||||||
$o =~ s/\.c$/.obj/;
|
$o =~ s/\.c$/.obj/;
|
||||||
$o =~ s/\//$dir/g;
|
$o =~ s/\//$dir/g;
|
||||||
print(OUT "$b: $o src${dir}Mw.dll\n");
|
print(OUT "$b: $o src${dir}Mw.dll\n");
|
||||||
print(OUT " \$(LD) \$(EXE_LDFLAGS) $exeout\$@ $prefobj$o $needlibs ${lib}src${dir}Mw.lib");
|
print(OUT
|
||||||
if($f =~ /\Q${dir}gldemos${dir}\E/){
|
" \$(LD) \$(EXE_LDFLAGS) $exeout\$@ $prefobj$o $needlibs ${lib}src${dir}Mw.lib"
|
||||||
print(OUT " ${lib}opengl32.lib ${lib}glu32.lib");
|
);
|
||||||
}
|
|
||||||
print(OUT "\n");
|
if ($f =~ /\Q${dir}gldemos${dir}\E/) {
|
||||||
|
print(OUT " ${lib}opengl32.lib ${lib}glu32.lib");
|
||||||
|
}
|
||||||
|
print(OUT "\n");
|
||||||
print(OUT "\n");
|
print(OUT "\n");
|
||||||
print(OUT "$o: $f\n");
|
print(OUT "$o: $f\n");
|
||||||
print(OUT " \$(CC) \$(EXE_CFLAGS) ${out}\$@ $f\n");
|
print(OUT " \$(CC) \$(EXE_CFLAGS) ${out}\$@ $f\n");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue