Skip to content

Instantly share code, notes, and snippets.

View habibg1232191's full-sized avatar
💻
Work on AniJin

Luen habibg1232191

💻
Work on AniJin
View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Avalonia.Threading;
using DynamicData.Binding;
using July.Core.Plugin;
using July.Core.Services;
using ReactiveUI;
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<!--Avalonia doesen't support TrimMode=link currently,but we are working on that https://github.com/AvaloniaUI/Avalonia/issues/6892 -->
<TrimMode>copyused</TrimMode>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
</PropertyGroup>
<ItemGroup>
#include "juliwindow2.h"
bool JuliWindow2::nativeEvent(const QByteArray &eventType, void *message, long *res) {
if(eventType == "windows_generic_MSG") {
MSG* ms = (MSG*) message;
res = (long*) WndProc(ms->hwnd, ms->message, ms->wParam, ms->lParam);
}
return true;
}
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_NCHITTEST: {
return 0;
}
default:
{
return DefWindowProc(hWnd, message, wParam, lParam);
import androidx.compose.animation.*
import androidx.compose.animation.core.*
import androidx.compose.foundation.*
import androidx.compose.foundation.layout.*
import androidx.compose.material.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.window.*
import androidx.compose.foundation.Image
import androidx.compose.runtime.*
import androidx.compose.ui.graphics.ImageBitmap
import androidx.compose.ui.graphics.toComposeImageBitmap
import kotlinx.coroutines.delay
import org.bytedeco.ffmpeg.avcodec.AVCodecParameters
import org.bytedeco.ffmpeg.avutil.AVFrame
import org.bytedeco.ffmpeg.global.*
import org.bytedeco.ffmpeg.global.avformat.avformat_find_stream_info
import org.bytedeco.ffmpeg.global.avformat.avformat_open_input
import androidx.compose.animation.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.Layout
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.window.Popup
@Composable
fun AniJinPopup(
expanded: Boolean,
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.beryx.runtime") version "1.12.5"
kotlin("jvm") version "1.5.31"
kotlin("plugin.serialization") version "1.5.31"
application
}
group = "me.habib"
#ifndef UNICODE
#define UNICODE
#endif
#include <windows.h>
#include <string>
#include <iostream>
#include <filesystem>
std::wstring ExePath() {
HttpWebRequest checkedRequest = (HttpWebRequest) WebRequest.Create(remoteFilename);
HttpWebResponse checkedResponse = (HttpWebResponse) checkedRequest.GetResponse();
FileStream fs = new FileStream(localFilename, FileMode.OpenOrCreate);
request = (HttpWebRequest)WebRequest.Create(remoteFilename);
if (fs.Length < checkedResponse.ContentLength && fs.Length != 0)
{
request.Headers.Add("range", $"bytes={fs.Length}-");
}